diff options
| author | Mark Asselstine <mark.asselstine@windriver.com> | 2017-11-15 12:59:53 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-11-15 15:53:38 -0500 |
| commit | 3051160f23fe8e06e545859538c86ef3a3c39d7a (patch) | |
| tree | 97f922e30173df31dda04f10cca3beea27652eb8 /meta-openstack/recipes-devtools/python/python-neutron_git.bb | |
| parent | 3d512115129e2cea97067d23cb72fea62b70dd39 (diff) | |
| download | meta-cloud-services-3051160f23fe8e06e545859538c86ef3a3c39d7a.tar.gz | |
python-*: fixup postinst scripts
Checking for "$D" and doing an "exit 1" now results in errors such as:
[log_check] warning: %post(keystone-cronjobs-...) scriptlet failed, exit status 2
during image creation. Instead of escaping the script for "level-1"
(image creation postinst) we wrap the "level-2" (first boot) postinst
in an if statement. This also ensure the scriptlet in
indentity.bbclass is less prone to behaving differently based on the
postinsts defined in the classes which inherit 'identity'.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron_git.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron_git.bb | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index 51c2ac4..c837401 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
| @@ -138,29 +138,25 @@ do_install_append() { | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | pkg_postinst_${SRCNAME}-setup () { | 140 | pkg_postinst_${SRCNAME}-setup () { |
| 141 | if [ "x$D" != "x" ]; then | 141 | if [ -z "$D" ]; then |
| 142 | exit 1 | 142 | # This is to make sure postgres is configured and running |
| 143 | if ! pidof postmaster > /dev/null; then | ||
| 144 | /etc/init.d/postgresql-init | ||
| 145 | /etc/init.d/postgresql start | ||
| 146 | sleep 2 | ||
| 147 | fi | ||
| 148 | |||
| 149 | sudo -u postgres createdb neutron | ||
| 150 | sudo neutron-db-manage --config-file /etc/neutron/neutron.conf \ | ||
| 151 | --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head | ||
| 143 | fi | 152 | fi |
| 144 | |||
| 145 | # This is to make sure postgres is configured and running | ||
| 146 | if ! pidof postmaster > /dev/null; then | ||
| 147 | /etc/init.d/postgresql-init | ||
| 148 | /etc/init.d/postgresql start | ||
| 149 | sleep 2 | ||
| 150 | fi | ||
| 151 | |||
| 152 | sudo -u postgres createdb neutron | ||
| 153 | sudo neutron-db-manage --config-file /etc/neutron/neutron.conf \ | ||
| 154 | --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head | ||
| 155 | } | 153 | } |
| 156 | 154 | ||
| 157 | pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () { | 155 | pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () { |
| 158 | if [ "x$D" != "x" ]; then | 156 | if [ -z "$D" ]; then |
| 159 | exit 1 | 157 | /etc/init.d/openvswitch-switch start |
| 158 | ovs-vsctl --no-wait -- --may-exist add-br br-int | ||
| 160 | fi | 159 | fi |
| 161 | |||
| 162 | /etc/init.d/openvswitch-switch start | ||
| 163 | ovs-vsctl --no-wait -- --may-exist add-br br-int | ||
| 164 | } | 160 | } |
| 165 | 161 | ||
| 166 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 162 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
