refreshing snap from 1.13/stable to 1.15/stable fails
See original GitHub issueThe following sequence results in reproducible failures with the following inputs / outputs.
root@devstand:~# snap switch --channel=1.15/stable microk8s
"microk8s" switched to the "1.15/stable" channel
root@devstand:~# snap refresh --list
Name Version Rev Publisher Notes
microk8s v1.15.3 825 canonical✓ classic
consider re-refresh of "microk8s"
root@devstand:~# snap refresh --classic microk8s
error: cannot perform the following tasks:
- Run configure hook of "microk8s" snap if present (run hook "configure":
-----
+ source /snap/microk8s/825/actions/common/utils.sh
+ '[' '!' -d /var/snap/microk8s/825/certs ']'
+ '[' '!' -f /var/snap/microk8s/825/certs/csr.conf.template ']'
+ cp /snap/microk8s/825/certs/csr.conf.template /var/snap/microk8s/825/certs/csr.conf.template
+ grep requestheader-client-ca-file /var/snap/microk8s/825/args/kube-apiserver
--requestheader-client-ca-file=${SNAP_DATA}/certs/ca.crt
+ grep -E -- '--(requestheader-allowed-names|requestheader-extra-headers-prefix|requestheader-group-headers|requestheader-username-headers|proxy-client-cert-file|proxy-client-key-file)=' /var/snap/microk8s/825/args/kube-apiserver
+ echo 'Enabling Enable the aggregation layer'
Enabling Enable the aggregation layer
+ echo ''
+ echo --requestheader-allowed-names=front-proxy-client
+ echo --requestheader-extra-headers-prefix=X-Remote-Extra-
+ echo --requestheader-group-headers=X-Remote-Group
+ echo --requestheader-username-headers=X-Remote-User
+ echo '--proxy-client-cert-file=${SNAP_DATA}/certs/front-proxy-client.crt'
+ echo '--proxy-client-key-file=${SNAP_DATA}/certs/front-proxy-client.key'
+ systemctl restart snap.microk8s.daemon-apiserver
+ grep -e requestheader-client-ca-file=/var/snap/microk8s/.../certs/ca.crt /var/snap/microk8s/825/args/kube-apiserver
+ mkdir -p /var/snap/microk8s/825/var/lock/
+ '[' '!' -f /var/snap/microk8s/825/credentials/client.config ']'
+ echo 'Patching client config location'
Patching client config location
+ mkdir -p /var/snap/microk8s/825/credentials/
+ cp /snap/microk8s/825/client.config /var/snap/microk8s/825/credentials/
cp: cannot stat '/snap/microk8s/825/client.config': No such file or directory
-----)
root@devstand:~# snap tasks 32
Status Spawn Ready Summary
Done today at 14:52 PDT today at 14:53 PDT Ensure prerequisites for "microk8s" are available
Undone today at 14:52 PDT today at 14:53 PDT Download snap "microk8s" (825) from channel "1.15/stable"
Done today at 14:52 PDT today at 14:53 PDT Fetch and check assertions for snap "microk8s" (825)
Undone today at 14:52 PDT today at 14:53 PDT Mount snap "microk8s" (825)
Undone today at 14:52 PDT today at 14:53 PDT Run pre-refresh hook of "microk8s" snap if present
Undone today at 14:52 PDT today at 14:53 PDT Stop snap "microk8s" services
Undone today at 14:52 PDT today at 14:53 PDT Remove aliases for snap "microk8s"
Undone today at 14:52 PDT today at 14:53 PDT Make current revision for snap "microk8s" unavailable
Undone today at 14:52 PDT today at 14:53 PDT Copy snap "microk8s" data
Undone today at 14:52 PDT today at 14:53 PDT Setup snap "microk8s" (825) security profiles
Undone today at 14:52 PDT today at 14:53 PDT Make snap "microk8s" (825) available to the system
Undone today at 14:52 PDT today at 14:53 PDT Automatically connect eligible plugs and slots of snap "microk8s"
Undone today at 14:52 PDT today at 14:53 PDT Set automatic aliases for snap "microk8s"
Undone today at 14:52 PDT today at 14:53 PDT Setup snap "microk8s" aliases
Undone today at 14:52 PDT today at 14:53 PDT Run post-refresh hook of "microk8s" snap if present
Undone today at 14:52 PDT today at 14:53 PDT Start snap "microk8s" (825) services
Done today at 14:52 PDT today at 14:53 PDT Clean up "microk8s" (825) install
Error today at 14:52 PDT today at 14:53 PDT Run configure hook of "microk8s" snap if present
Hold today at 14:52 PDT today at 14:53 PDT Run health check of "microk8s" snap
Done today at 14:52 PDT today at 14:53 PDT Consider re-refresh of "microk8s"
......................................................................
Run configure hook of "microk8s" snap if present
2019-09-11T14:53:26-07:00 ERROR run hook "configure":
-----
+ source /snap/microk8s/825/actions/common/utils.sh
+ '[' '!' -d /var/snap/microk8s/825/certs ']'
+ '[' '!' -f /var/snap/microk8s/825/certs/csr.conf.template ']'
+ cp /snap/microk8s/825/certs/csr.conf.template /var/snap/microk8s/825/certs/csr.conf.template
+ grep requestheader-client-ca-file /var/snap/microk8s/825/args/kube-apiserver
--requestheader-client-ca-file=${SNAP_DATA}/certs/ca.crt
+ grep -E -- '--(requestheader-allowed-names|requestheader-extra-headers-prefix|requestheader-group-headers|requestheader-username-headers|proxy-client-cert-file|proxy-client-key-file)=' /var/snap/microk8s/825/args/kube-apiserver
+ echo 'Enabling Enable the aggregation layer'
Enabling Enable the aggregation layer
+ echo ''
+ echo --requestheader-allowed-names=front-proxy-client
+ echo --requestheader-extra-headers-prefix=X-Remote-Extra-
+ echo --requestheader-group-headers=X-Remote-Group
+ echo --requestheader-username-headers=X-Remote-User
+ echo '--proxy-client-cert-file=${SNAP_DATA}/certs/front-proxy-client.crt'
+ echo '--proxy-client-key-file=${SNAP_DATA}/certs/front-proxy-client.key'
+ systemctl restart snap.microk8s.daemon-apiserver
+ grep -e requestheader-client-ca-file=/var/snap/microk8s/.../certs/ca.crt /var/snap/microk8s/825/args/kube-apiserver
+ mkdir -p /var/snap/microk8s/825/var/lock/
+ '[' '!' -f /var/snap/microk8s/825/credentials/client.config ']'
+ echo 'Patching client config location'
Patching client config location
+ mkdir -p /var/snap/microk8s/825/credentials/
+ cp /snap/microk8s/825/client.config /var/snap/microk8s/825/credentials/
cp: cannot stat '/snap/microk8s/825/client.config': No such file or directory
-----
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Issues - GitHub
The following sequence results in reproducible failures with the following ... refreshing snap from 1.13/stable to 1.15/stable fails #641.
Read more >Error when joining cohort - snapd - snapcraft.io
It seems that for classic snaps, while refreshing to a different channel using snap refresh does not require specifying --classic , joining ...
Read more >Preferred storage error not available during bootstrap ...
ERROR preferred storage “microk8s.io/hostpath” not available Seen this post with similar error but the solution there didn't work for me.
Read more >ubuntu--snap install microk8s - 51core - 博客园
The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions,
Read more >Registry addon - resizing the default 20GB capacity - microk8s
I was wondering if anyone could advise me how to resize the built-in microk8s registry add-on's capacity? It defaults to 20 GB and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix should be on edge now. Try upgradind to 1.15/edge.
Great! The refresh works as intended, but I found another side effect of replacing docker with containerd. The DNS plugin gets stuck with the following sequence:
It tries to delete the pod by looking for a docker socket, which is no longer present so it is stuck in the state Terminating.
Additionally, after the refresh, I cannot create interactive pods. The following fails with this output
Removing microk8s and installing 1.15/edge and repeating the above succeeds.