Run nova-manage as root to prevent wrong nova-manage.log permissions
To verify if the default cell is created we run a nova-manage command. Right now this is triggered as root and not as nova like the otheres. In case it is the first time on the node it creates the nova-manage.log with root user and follow up call as nova user will fail. Related-bug: 1820590 Change-Id: I56a961615c0afa748a42c25d4614637275b7c33b
This commit is contained in:
parent
b222fd2324
commit
08015d6f91
|
@ -310,7 +310,7 @@ outputs:
|
|||
str_replace:
|
||||
template: |
|
||||
#!/bin/bash
|
||||
DEFID=$(nova-manage cell_v2 list_cells | sed -e '1,3d' -e '$d' | awk -F ' *| *' '$2 == "default" {print $4}')
|
||||
DEFID=$(su nova -s /bin/bash -c "nova-manage cell_v2 list_cells" | sed -e '1,3d' -e '$d' | awk -F ' *| *' '$2 == "default" {print $4}')
|
||||
if [ "$DEFID" ]; then
|
||||
echo "(cellv2) Updating default cell_v2 cell $DEFID"
|
||||
su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 update_cell --cell_uuid $DEFID --name=default --database_connection='CELLDB' --transport-url='TRANSPORTURL'"
|
||||
|
|
Loading…
Reference in New Issue