Add cinder user for cinder-manage commands
Change-Id: Ib4359eac45f63dff60ef34e9753151c9453fd51e
Related-Prod: PROD-26062
diff --git a/cinder/db/offline_sync.sls b/cinder/db/offline_sync.sls
index 33da95e..505022d 100644
--- a/cinder/db/offline_sync.sls
+++ b/cinder/db/offline_sync.sls
@@ -3,6 +3,7 @@
cinder_syncdb:
cmd.run:
- name: 'cinder-manage db sync; sleep 5;'
+ - runas: 'cinder'
{%- if grains.get('noservices') or controller.get('role', 'primary') == 'secondary' %}
- onlyif: /bin/false
{%- endif %}
diff --git a/cinder/db/online_sync.sls b/cinder/db/online_sync.sls
index bdc1082..97754e0 100644
--- a/cinder/db/online_sync.sls
+++ b/cinder/db/online_sync.sls
@@ -3,6 +3,7 @@
cinder_controller_online_data_migrations:
cmd.run:
- name: cinder-manage db online_data_migrations
+ - runas: 'cinder'
{%- if grains.get('noservices') or controller.get('role', 'primary') == 'secondary' %}
- onlyif: /bin/false
{%- endif %}
diff --git a/cinder/upgrade/post/init.sls b/cinder/upgrade/post/init.sls
index e9b886a..e123a80 100644
--- a/cinder/upgrade/post/init.sls
+++ b/cinder/upgrade/post/init.sls
@@ -20,6 +20,7 @@
cinder_syncdb_version:
cmd.run:
- name: 'cinder-manage db sync --bump-versions; sleep 5'
+ - runas: 'cinder'
{%- if grains.get('noservices') or controller.get('role', 'primary') == 'secondary' %}
- onlyif: /bin/false
{%- endif %}