Bug 1623123 - [Deployment] Stack deployment fails when it is redeployed without deleting the previous deployment
Summary: [Deployment] Stack deployment fails when it is redeployed without deleting th...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: z5
: 13.0 (Queens)
Assignee: Janki
QA Contact: Noam Manos
URL:
Whiteboard: Deployment
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-28 14:11 UTC by Janki
Modified: 2021-12-10 17:23 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.0.7-12.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, ODL configuration files were missing after redeployment. With this update, `/opt/opendaylight/data` is no longer mounted on the host. As a result, the ODL configuration files are generated during redeployment.
Clone Of:
Environment:
Last Closed: 2019-03-06 16:16:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1799395 0 None None None 2018-10-23 09:53:42 UTC
OpenStack gerrit 612663 0 None MERGED Delete empty karaf directory on host 2020-06-19 08:35:17 UTC
OpenStack gerrit 613881 0 None MERGED Delete empty karaf directory on host 2020-06-19 08:35:13 UTC
OpenStack gerrit 614578 0 None MERGED Delete empty karaf directory on host 2020-06-19 08:35:13 UTC
OpenStack gerrit 615122 0 None MERGED [queens-only] Correct misindentation 2020-06-19 08:35:13 UTC
OpenStack gerrit 620053 0 None MERGED Don't mount data folder 2020-06-19 08:35:13 UTC
OpenStack gerrit 623324 0 None NEW Don't mount data folder 2020-06-19 08:35:13 UTC
Red Hat Issue Tracker ODL-128 0 None None None 2021-12-10 17:23:40 UTC
Red Hat Issue Tracker OSP-11598 0 None None None 2021-12-10 17:23:42 UTC

Description Janki 2018-08-28 14:11:53 UTC
Description of problem:
Redeployment of already deployed stack fails with OSP + ODL deployment

Version-Release number of selected component (if applicable):
OSP13 + ODL

How reproducible:
Always

Steps to Reproduce:
1. Deploy overcloud with ODL
2. Redeploy it without deleting the previous deployment

Actual results:
Deployment fails

Expected results:
Deployment should not fail

Additional info:

Comment 2 Janki 2018-10-12 13:53:26 UTC
Karaf log snippet:
2018-10-12T12:10:54,728 | ERROR | ConfigFeatureListener - ConfigPusher | AbstractFeatureWrapper           | 52 - config-persister-feature-adapter - 0.8.3.redhat-3 | Could not parse XML file /opt/opendaylight/etc/opendaylight/karaf/00-netty.xml
java.io.FileNotFoundException: /opt/opendaylight/etc/opendaylight/karaf/00-netty.xml (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:195) [?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [?:?]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.isConfigSnapshot(AbstractFeatureWrapper.java:116) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.getFeatureConfigSnapshotHolders(AbstractFeatureWrapper.java:75) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:89) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
...

2018-10-12T12:10:54,762 | ERROR | ConfigFeatureListener - ConfigPusher | AbstractFeatureWrapper           | 52 - config-persister-feature-adapter - 0.8.3.redhat-3 | Could not parse XML file /opt/opendaylight/etc/opendaylight/karaf/01-md-sal.xml
java.io.FileNotFoundException: /opt/opendaylight/etc/opendaylight/karaf/01-md-sal.xml (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:195) [?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [?:?]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.isConfigSnapshot(AbstractFeatureWrapper.java:116) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.getFeatureConfigSnapshotHolders(AbstractFeatureWrapper.java:75) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:89) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfig(FeatureConfigPusher.java:101) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfigs(FeatureConfigPusher.java:69) [52:config-persister-feature-adapter:0.8.3.redhat-3]
...

2018-10-12T12:10:54,763 | ERROR | ConfigFeatureListener - ConfigPusher | AbstractFeatureWrapper           | 52 - config-persister-feature-adapter - 0.8.3.redhat-3 | Could not parse XML file /opt/opendaylight/etc/opendaylight/karaf/05-clustering.xml
java.io.FileNotFoundException: /opt/opendaylight/etc/opendaylight/karaf/05-clustering.xml (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:195) [?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [?:?]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.isConfigSnapshot(AbstractFeatureWrapper.java:116) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.AbstractFeatureWrapper.getFeatureConfigSnapshotHolders(AbstractFeatureWrapper.java:75) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:89) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ChildAwareFeatureWrapper.getFeatureConfigSnapshotHolders(ChildAwareFeatureWrapper.java:81) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfig(FeatureConfigPusher.java:101) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfigs(FeatureConfigPusher.java:69) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ConfigPushingRunnable.processFeatureEvent(ConfigPushingRunnable.java:70) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at org.opendaylight.controller.configpusherfeature.internal.ConfigPushingRunnable.run(ConfigPushingRunnable.java:52) [52:config-persister-feature-adapter:0.8.3.redhat-3]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-10-12T12:10:54,764 | ERROR | ConfigFeatureListener - ConfigPusher | AbstractFeatureWrapper           | 52 - config-persister-feature-adapter - 0.8.3.redhat-3 | Could not parse XML file /opt/opendaylight/etc/opendaylight/karaf/06-clustered-entity-ownership.xml
java.io.FileNotFoundException: /opt/opendaylight/etc/opendaylight/karaf/06-clustered-entity-ownership.xml (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:195) [?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [?:?]
@                                                                            

All the /opt/opendaylight/etc/opendaylight/karaf/* files are missing

8:xx timestamps are for the first original deployment. 13:xx for the redeployment.

Container is restarted just once
[heat-admin@controller-0 ~]$ sudo journalctl CONTAINER_NAME=opendaylight_api | grep "sudo -E kolla_set_configs"
Oct 12 08:15:31 controller-0 dockerd-current[19485]: + sudo -E kolla_set_configs
Oct 12 13:10:30 controller-0 dockerd-current[19485]: + sudo -E kolla_set_configs

[heat-admin@controller-0 ~]$ grep -r "etc/opendaylight/karaf" odl_journal.log 
Oct 12 08:15:31 controller-0 dockerd-current[19485]: INFO:__main__:Creating directory /opt/opendaylight/etc/opendaylight/karaf
Oct 12 08:15:31 controller-0 dockerd-current[19485]: INFO:__main__:Setting permission for /opt/opendaylight/etc/opendaylight/karaf
Oct 12 13:10:31 controller-0 dockerd-current[19485]: INFO:__main__:Creating directory /opt/opendaylight/etc/opendaylight/karaf

Comment 7 Janki 2018-10-23 09:53:42 UTC
Root cause:
/opt/opendaylight/etc/opendaylight/karaf from container is mounted to /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf on host. Contents of /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf are reflected at /opt/opendaylight/etc/opendaylight/karaf. During the first install, /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf on host is empty because files inside this folder are not generated by puppet but by kolla inside the container. During redploy, the empty /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf is mounted to container. So /opt/opendaylight/etc/opendaylight/karaf inside container is empty and hence when ODL restarts, it complais of /opt/opendaylight/etc/opendaylight/karaf/* files missing and ODL can't restart leading to failed deployment.

Solution:
Delete empty var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf on host before restarting ODL.

Comment 9 Janki 2018-10-23 10:59:33 UTC
This also affects while running "update converge"

Comment 11 Mike Kolesnik 2018-10-23 11:26:47 UTC
Per Janki's observation this is needed for updates to work, re-targeting to OSP 13 z4

Comment 14 Janki 2018-11-02 12:02:10 UTC
https://review.openstack.org/#/c/615122/ is a minor patch of fixing an indentation.

Comment 15 Janki 2018-11-08 11:53:28 UTC
To verify:
1. Deploy OSP + ODL
2. Redeploy the same stack again by running the overcloud deploy command or ./overcloud_deploy.sh script (Donot delete 'openstack stack delete overlcoud --wait --yes' the exisitng stack)

Comment 16 Michel Peterson 2018-11-29 09:25:37 UTC
I've tested this bug with the solution Janki provided [1]. I can confirm that it solves the root cause and the overcloud update succeeds. 

[1] https://review.openstack.org/620053

Putting it to ON_DEV as it needs further work and that patch to land for this bug to be resolved.

Comment 17 Janki 2018-11-29 09:28:33 UTC
With the current implementation, redeployment is sometimes still fails with the same error because /opt/opendaylight/data folder is mounted to container on restart. This folder has information which makes ODL believe that it has features installs so ODL doesnot generate /opt/opendaylight/etc/opendaylight/karaf/*.xml files which leads ODL not able to boot. 
Needs https://review.openstack.org/#/c/620053/ which doesnot mount ../data folder on container to ensure 100% success rate.

Comment 18 Janki 2018-11-30 04:29:09 UTC
(In reply to Janki from comment #7)
> Root cause:
> /opt/opendaylight/etc/opendaylight/karaf from container is mounted to
> /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/
> opendaylight/karaf on host. Contents of
> /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/
> opendaylight/karaf are reflected at
> /opt/opendaylight/etc/opendaylight/karaf. During the first install,
> /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/
> opendaylight/karaf on host is empty because files inside this folder are not
> generated by puppet but by kolla inside the container. During redploy, the
> empty
> /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/
> opendaylight/karaf is mounted to container. So
> /opt/opendaylight/etc/opendaylight/karaf inside container is empty and hence
> when ODL restarts, it complais of /opt/opendaylight/etc/opendaylight/karaf/*
> files missing and ODL can't restart leading to failed deployment.
> 
> Solution:
> Delete empty
> var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/
> opendaylight/karaf on host before restarting ODL.

Well actually /var/lib/config-data/puppet-generated/opendaylight/opt/opendaylight/etc/opendaylight/karaf is mounted to /var/lib/kolla/config_files/src from where it is copied to /opt/opendaylight/etc/opendaylight/karaf.

Comment 19 Janki 2018-12-07 12:55:07 UTC
I tested it with patch https://review.openstack.org/#/c/620053/ and it works fine

Comment 20 Daniel Farrell 2018-12-11 00:53:10 UTC
I verified that the cherry-pick to stable/queens (https://review.openstack.org/#/c/623324) fixes this for OSP13. Also, to be safe, I verified that without this patch the failure occurs.

Comment 23 Lon Hohberger 2019-01-17 11:34:03 UTC
According to our records, this should be resolved by openstack-tripleo-heat-templates-8.0.7-21.el7ost.  This build is available now.

Comment 24 Franck Baudin 2019-03-06 16:16:54 UTC
As per depreciation notice [1], closing this bug. Please reopen if relevant for RHOSP13, as this is the only version shipping ODL.

[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/14/html-single/release_notes/index#deprecated_functionality

Comment 25 Franck Baudin 2019-03-06 16:17:52 UTC
As per depreciation notice [1], closing this bug. Please reopen if relevant for RHOSP13, as this is the only version shipping ODL.

[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/14/html-single/release_notes/index#deprecated_functionality


Note You need to log in before you can comment on or make changes to this bug.