Tech-Debt: Duplicate code in extend_start.sh

Bug #1546944 reported by Éric Lemoine
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Wishlist
Éric Lemoine

Bug Description

As reported by Sam Yaple in [*] the Heka work introduces duplicate code in extend_start.sh for the OpenStack services.

For example the content of nova-base/extend_start.sh is:

    if [[ ! -d "/var/log/kolla/nova" ]]; then
        mkdir -p /var/log/kolla/nova
    fi
    if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then
        chmod 755 /var/log/kolla/nova
    fi

And nova-api/extend_start.sh includes the same code. nova-api/extend_start.sh overrides nova-base/extend_start.sh, this is why the code duplication is necessary.

Kolla should provide a way to avoid this duplicate code.

[*] <https://review.openstack.org/#/c/275846/21/docker/nova/nova-base/extend_start.sh>

Steven Dake (sdake)
Changed in kolla:
importance: Undecided → Wishlist
milestone: none → mitaka-3
status: New → Triaged
Steven Dake (sdake)
Changed in kolla:
status: Triaged → Confirmed
assignee: nobody → elemoine (elemoine)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/283082

Changed in kolla:
status: Confirmed → In Progress
Revision history for this message
Éric Lemoine (elemoine) wrote :

See https://review.openstack.org/283082 for a proposal on how to fix the issue (in a simple way). If people agree with the approach I'll go ahead and do the same for the other services (glance, neutron, cinder, heat, murano and magnum).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/283082
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=ede53b1dcbd475aa0dff339ee8dffaa9008247a9
Submitter: Jenkins
Branch: master

commit ede53b1dcbd475aa0dff339ee8dffaa9008247a9
Author: Éric Lemoine <email address hidden>
Date: Mon Feb 22 14:32:31 2016 +0100

    Remove duplicate code in nova extend_start.sh

    Change-Id: I37d737509bc7cf3dc74bb13ecb0a6ae68080556e
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/284055

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/284058

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/284062

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/284067

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/284070

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/284071

Revision history for this message
Éric Lemoine (elemoine) wrote :

I created Review Requests for every concerned service: cinder, glance, heat, magnum, murano, neutron, nova.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/284067
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=93b5c12abf37692c8c15d62ba98d002fe2a774df
Submitter: Jenkins
Branch: master

commit 93b5c12abf37692c8c15d62ba98d002fe2a774df
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 11:57:55 2016 +0100

    Remove duplicate code in heat extend_start.sh

    Change-Id: I8970d02ccbed1dfc221683e273edc2680207056b
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/284058
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=63e2c64081c384548daff46b5db8dfa3c97f9c25
Submitter: Jenkins
Branch: master

commit 63e2c64081c384548daff46b5db8dfa3c97f9c25
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 11:41:23 2016 +0100

    Remove duplicate code in glance extend_start.sh

    Change-Id: I34f63aef2a473c475f3740e160f64e6c1ee758fc
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/284062
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=1382e39f162d827199a8baa39cffb9c1812cc3c1
Submitter: Jenkins
Branch: master

commit 1382e39f162d827199a8baa39cffb9c1812cc3c1
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 11:48:06 2016 +0100

    Remove duplicate code in cinder extend_start.sh

    Change-Id: I71953c905b978176bf7dc6bcaf3c4766be4b60fb
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/284070
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=feca4a3f4a4a16797ee32743be834ac04a0873e7
Submitter: Jenkins
Branch: master

commit feca4a3f4a4a16797ee32743be834ac04a0873e7
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 12:04:02 2016 +0100

    Remove duplicate code in magnum extend_start.sh

    Change-Id: Iaa7049834be784c7410970fb9f0b25086891211d
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/284071
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=34ac0dfad21b02d7b94f3239a420e998c04f8ea2
Submitter: Jenkins
Branch: master

commit 34ac0dfad21b02d7b94f3239a420e998c04f8ea2
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 12:10:22 2016 +0100

    Remove duplicate code in murano extend_start.sh

    Change-Id: I32e55ce520c95b3d2c018604e925bd8d4fdf58f1
    Partial-Bug: #1546944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/284055
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=509acbb83f80f11fb65e7765baffb022df177527
Submitter: Jenkins
Branch: master

commit 509acbb83f80f11fb65e7765baffb022df177527
Author: Éric Lemoine <email address hidden>
Date: Wed Feb 24 11:29:09 2016 +0100

    Remove duplicate code in neutron extend_start.sh

    Change-Id: I74aa68d809e9b38a605093abc4e2b8ca14335dee
    Partial-Bug: #1546944

Steven Dake (sdake)
Changed in kolla:
milestone: mitaka-3 → mitaka-rc1
Revision history for this message
Éric Lemoine (elemoine) wrote :

Steven, the status of this bug can be changed to "Fix Committed" (or "Fix Released") as all commits for this have been merged. See https://review.openstack.org/#/q/status:merged+project:openstack/kolla+branch:master+topic:bug/1546944.

Changed in kolla:
status: In Progress → Fix Committed
Revision history for this message
Swapnil Kulkarni (coolsvap-deactivatedaccount) wrote :

Changing status to Fix Released.

Changed in kolla:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.