Deployment fails if /tmp and /var are on different file systems.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Flannel Charm |
New
|
Undecided
|
Unassigned |
Bug Description
Opened by Karimerto on 2018-02-23 11:58:04+00:00 at https:/
-------
I am manually trying to deploy a simple kubernetes system following this guide: Kubernetes on Ubuntu VMs
Everything goes well and everything seems to be in place, except for flannel. Looking at the logs I quickly found out why:
2018-02-23 11:47:55 INFO juju-log Reactive main running for hook update-status
2018-02-23 11:47:55 INFO juju-log Invoking reactive handler: reactive/
2018-02-23 11:47:56 DEBUG update-status ERROR could not download resource: could not replace existing resource directory: rename /tmp/juju-
2018-02-23 11:47:56 INFO juju-log Missing flannel resource.
Renaming a file across file system boundaries is obviously not possible, so the solution here would be to either use /var/tmp as the temporary folder, or actually copy the file in question. I have not yet had a chance to look at any of the code, but this does not sound too difficult to fix.
=======
Comment created by Cynerva on 2018-02-23 14:39:58+00:00
Thanks for the report.
It looks like the call to `resource_get` here returns empty: https:/
`resource_get` makes a subprocess call to `resource-get`, catches the error, and returns `False`: https:/
So I'm pretty sure the root error:
```
ERROR could not download resource: could not replace existing resource directory: rename /tmp/juju-
```
is coming from `resource-get`, which is a Juju primitive. I've opened an issue to get that looked at: https:/
@Karimerto Can you share the output of `juju version`, either here or in the linked Juju bug? Thanks.
-------
Comment created by Karimerto on 2018-02-23 21:49:36+00:00
Certainly, I am using the latest(?) juju that was available via snap a few days ago.
```
$ juju version
2.3.3-xenial-amd64
```
I was looking at the code of [coreos/flannel](https:/
-------
Comment created by Karimerto on 2018-02-25 19:37:12+00:00
It seems simply mounting `/tmp` elsewhere (`mount --bind /var/newtmp /tmp`) and restarting the flannel service (`systemctl restart jujud-unit-
I think the temp file itself (`/tmp/