config-changed chown: cannot access '/srv/nova/instances': No such file or directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Nova Compute Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
xenial-queens, master charms pre-18.05:
The nova-compute charm traces trying to chown the instance storage directory because it does not yet exist.
2018-05-15 11:00:36 INFO juju-log Generating new ssh key for user nova.
2018-05-15 11:00:36 DEBUG worker.uniter.jujuc server.go:178 running hook tool "relation-get"
2018-05-15 11:00:36 DEBUG config-changed ERROR no relation id specified
2018-05-15 11:00:36 DEBUG worker.uniter.jujuc server.go:178 running hook tool "relation-get"
2018-05-15 11:00:36 DEBUG config-changed ERROR no relation id specified
2018-05-15 11:00:36 DEBUG config-changed chown: cannot access '/srv/nova/
2018-05-15 11:00:36 DEBUG config-changed Traceback (most recent call last):
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed main()
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed hooks.execute(
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed self._hooks[
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed restart_functions)
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed r = lambda_f()
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed (lambda: f(*args, **kwargs)), restart_map, stopstart,
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed return f(*args, **kwargs)
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed fix_path_
2018-05-15 11:00:36 DEBUG config-changed File "/var/lib/
2018-05-15 11:00:36 DEBUG config-changed check_call(cmd)
2018-05-15 11:00:36 DEBUG config-changed File "/usr/lib/
2018-05-15 11:00:36 DEBUG config-changed raise CalledProcessEr
2018-05-15 11:00:36 DEBUG config-changed subprocess.
2018-05-15 11:00:36 ERROR juju.worker.
2018-05-15 11:00:36 DEBUG juju.worker.
2018-05-15 11:00:36 INFO juju.worker.uniter resolver.go:100 awaiting error resolution for "config-changed" hook
2018-05-15 11:00:36 DEBUG juju.worker.uniter agent.go:17 [AGENT-STATUS] error: hook failed: "config-changed"
2018-05-15 11:00:36 INFO juju.worker.uniter resolver.go:100 awaiting error resolution for "config-changed" hook
.
#### Workaround:
juju run --application nova-compute "sudo mkdir -vp /srv/nova/
juju resolved nova-compute/0
juju resolved nova-compute/1
juju resolved nova-compute/2
juju resolved nova-compute/3
So '/srv/nova/ instances' comes from the config.yaml 'instances-path', which has a default of /var/lib/ nova/instances -- so it must be set for this to happen.
Options:
1. Not do the action of setting the permissions if the lib doesn't exist.
2. Create the directory and then set the permissions, if it doesn't exist.