question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

snap refresh microk8s fails (from v1.18.2)

See original GitHub issue

Ubuntu 18.04, currently on:

installed: v1.18.2 (1378) 201MB classic

snap refresh microk8s fails with:

+ for dir in "${SNAP_DATA}/credentials/ ${SNAP_DATA}/certs/ ${SNAP_DATA}/args/ ${SNAP_DATA}/[0/1836]
"
+ chmod -R ug+rwX /var/snap/microk8s/1443/credentials/ /var/snap/microk8s/1443/certs/ /var/snap/micr
ok8s/1443/args/ /var/snap/microk8s/1443/var/lock
+ chmod -R o-rwX /var/snap/microk8s/1443/credentials/ /var/snap/microk8s/1443/certs/ /var/snap/micro
k8s/1443/args/ /var/snap/microk8s/1443/var/lock
+ getent group microk8s
+ getent group microk8s
+ chgrp microk8s -R /var/snap/microk8s/1443/credentials/ /var/snap/microk8s/1443/certs/ /var/snap/mi
crok8s/1443/args/ /var/snap/microk8s/1443/var/lock/
+ '[' -f /var/snap/microk8s/1443/args/flanneld ']'
+ grep -e etcd.socket:2379 /var/snap/microk8s/1443/args/etcd
+ grep '\-\-enable\-v2' /var/snap/microk8s/1443/args/etcd
--enable-v2=true
+ false
+ '[' -L /var/snap/microk8s/1443/bin/cilium ']'
+ '[' -e /var/snap/microk8s/1443/args/containerd-template.toml ']'
+ grep -e 'plugins.cri.registry.mirrors."local.insecure-registry.io"' /var/snap/microk8s/1443/args/c
ontainerd-template.toml
+ '[' -e /var/snap/microk8s/1443/var/lock/clustered.lock ']'
+ '[' -e /var/snap/microk8s/1443/args/flannel-template.conflist ']'
+ grep -e cniVersion /var/snap/microk8s/1443/args/flannel-template.conflist
    "cniVersion": "0.3.1",
+ grep -e '\-\-timeout' /var/snap/microk8s/1443/args/cluster-agent
grep: /var/snap/microk8s/1443/args/cluster-agent: No such file or directory
+ refresh_opt_in_config timeout 240 cluster-agent
+ local opt=--timeout
+ local value=240
+ local config_file=/var/snap/microk8s/1443/args/cluster-agent
+ local replace_line=--timeout=240
++ grep -qE '^--timeout=' /var/snap/microk8s/1443/args/cluster-agent
grep: /var/snap/microk8s/1443/args/cluster-agent: No such file or directory
+ run_with_sudo /snap/microk8s/1443/bin/sed -i '$ a --timeout=240' /var/snap/microk8s/1443/args/clus
ter-agent
+ '[' -n '' ']'
+ '[' /snap/microk8s/1443/bin/sed == preserve_env ']'
+ sudo /snap/microk8s/1443/bin/sed -i '$ a --timeout=240' /var/snap/microk8s/1443/args/cluster-agent
/snap/microk8s/1443/bin/sed: can't read /var/snap/microk8s/1443/args/cluster-agent: No such file or
directory
-----)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
tomtorcommented, Jun 11, 2020

@balchua Thanks!

cp /snap/microk8s/current/default-args/cluster-agent /var/snap/microk8s/current/args/
snap refresh microk8s

worked!

I assume many users have this issue. I only noticed it because I have a watchdog monitoring the cluster and it goes down a few minutes every few hours (due to a failed update) since the last 3 days:

2020-06-11 13:35:02.004615+00:00 0:02:00.390599
2020-06-11 09:49:01.960818+00:00 0:03:00.285431
2020-06-11 09:23:01.199726+00:00 0:02:59.145173
2020-06-11 09:05:02.067254+00:00 0:02:00.187082
2020-06-11 08:58:01.129220+00:00 0:10:59.307220
2020-06-11 07:20:01.438388+00:00 0:01:59.825661
2020-06-11 00:39:01.975900+00:00 0:02:00.457308
2020-06-10 22:40:01.123141+00:00 0:01:59.433738
2020-06-10 17:00:02.066083+00:00 0:03:00.988085
2020-06-10 10:56:01.992499+00:00 0:03:00.589398
2020-06-10 02:30:01.643774+00:00 0:03:00.056305
2020-06-09 19:01:01.383671+00:00 0:02:59.675328
2020-06-09 15:05:01.197224+00:00 0:03:00.047818
2020-06-09 11:15:01.543906+00:00 0:02:59.555052
2020-04-28 01:36:01.764504+00:00 0:02:59.101809
1reaction
balchuacommented, Jun 11, 2020

That’s what i suspect. Looks like an easy fix. But if you are in a hurry, you can copy the /snap/microk8s/current/default-args/cluster-agent to /var/snap/microk8s/current/args/. Then try to do refresh.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snap refreshes - MicroK8s
Snap refreshes. Snaps are app packages for desktop, cloud and IoT that are easy to install, secure, cross‐platform and dependency‐free and is the...
Read more >
microk8s stopped working after latest ubuntu update #1193
I'm running Ubuntu 18.04.4 LTS Inspecting services Service snap.... ... I'm running v1.18.2 latest/stable version of microk8s.
Read more >
Snap refresh failing due to containerd having "running apps"
Refreshing MicroK8s seems to be failing with: $ sudo snap install ./s.snap --dangerous --classic error: cannot perform the following tasks:
Read more >
Snap refresh breaks MicroK8s cluster - Snapcraft forum
Hi snap people, One of our users reported that in a cluster of 5 nodes nodes two of them refreshed correctly while the...
Read more >
How to control MicroK8s upgrades using a Snap Store Proxy
sudo snap refresh snapd sudo snap install snap-store-proxy ... snap list microk8s ... channels: 1.22/stable: v1.22.3 2021-11-14 (2645) 194MB ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found