Horizon static asset compression failures ignored

Bug #1824137 reported by Mark Goddard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Mark Goddard
Stein
Fix Released
Medium
Mark Goddard
Train
Fix Released
Medium
Mark Goddard

Bug Description

If you run the horizon container with a restart policy of never, and the static asset compression fails, the container fails to start, e.g. (seen in CI)

++ /usr/bin/manage.py collectstatic --noinput --clear
Traceback (most recent call last):
  File "/usr/bin/manage.py", line 18, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

However, with a restart policy of unless-stopped (the default). the horizon container will fail the first time but will succeed after a restart. This is because the settings bundle hash is updated before the compression is attempted.

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/651506

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

Reviewed: https://review.openstack.org/651506
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=92c2456851857c45e8de9a3ff8f167579e0588f4
Submitter: Zuul
Branch: master

commit 92c2456851857c45e8de9a3ff8f167579e0588f4
Author: Mark Goddard <email address hidden>
Date: Wed Apr 10 12:44:37 2019 +0100

    Write hash after compressing horizon static assets

    If you run the horizon container with a restart policy of never, and the
    static asset compression fails, the container fails to start, e.g. (seen
    in CI)

    ++ /usr/bin/manage.py collectstatic --noinput --clear
    Traceback (most recent call last):
      File "/usr/bin/manage.py", line 18, in <module>
          from django.core.management import execute_from_command_line
      ImportError: No module named django.core.management

    However, with a restart policy of unless-stopped (the default). the
    horizon container will fail the first time but will succeed after a
    restart. This is because the settings bundle hash is updated before the
    compression is attempted.

    To fix this, update the hash after compression completes successfully.

    Change-Id: I3f1682ed55e7d45c1e97a1b34c7993aa839f0bb2
    Closes-Bug: #1824137

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.openstack.org/652927

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

Reviewed: https://review.openstack.org/652927
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=6e010e25e3e4bf3a26a40a3a0b27055512d8a93e
Submitter: Zuul
Branch: stable/stein

commit 6e010e25e3e4bf3a26a40a3a0b27055512d8a93e
Author: Mark Goddard <email address hidden>
Date: Wed Apr 10 12:44:37 2019 +0100

    Write hash after compressing horizon static assets

    If you run the horizon container with a restart policy of never, and the
    static asset compression fails, the container fails to start, e.g. (seen
    in CI)

    ++ /usr/bin/manage.py collectstatic --noinput --clear
    Traceback (most recent call last):
      File "/usr/bin/manage.py", line 18, in <module>
          from django.core.management import execute_from_command_line
      ImportError: No module named django.core.management

    However, with a restart policy of unless-stopped (the default). the
    horizon container will fail the first time but will succeed after a
    restart. This is because the settings bundle hash is updated before the
    compression is attempted.

    To fix this, update the hash after compression completes successfully.

    Change-Id: I3f1682ed55e7d45c1e97a1b34c7993aa839f0bb2
    Closes-Bug: #1824137
    (cherry picked from commit 92c2456851857c45e8de9a3ff8f167579e0588f4)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/669805

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

Reviewed: https://review.opendev.org/669805
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=b0ef7abd54ffdd4fdc9a477ed79f95c20cfc423d
Submitter: Zuul
Branch: stable/rocky

commit b0ef7abd54ffdd4fdc9a477ed79f95c20cfc423d
Author: Mark Goddard <email address hidden>
Date: Wed Apr 10 12:44:37 2019 +0100

    Write hash after compressing horizon static assets

    If you run the horizon container with a restart policy of never, and the
    static asset compression fails, the container fails to start, e.g. (seen
    in CI)

    ++ /usr/bin/manage.py collectstatic --noinput --clear
    Traceback (most recent call last):
      File "/usr/bin/manage.py", line 18, in <module>
          from django.core.management import execute_from_command_line
      ImportError: No module named django.core.management

    However, with a restart policy of unless-stopped (the default). the
    horizon container will fail the first time but will succeed after a
    restart. This is because the settings bundle hash is updated before the
    compression is attempted.

    To fix this, update the hash after compression completes successfully.

    Change-Id: I3f1682ed55e7d45c1e97a1b34c7993aa839f0bb2
    Closes-Bug: #1824137
    (cherry picked from commit 92c2456851857c45e8de9a3ff8f167579e0588f4)
    (cherry picked from commit 6e010e25e3e4bf3a26a40a3a0b27055512d8a93e)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 8.0.0.0rc2

This issue was fixed in the openstack/kolla 8.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 7.0.4

This issue was fixed in the openstack/kolla 7.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 9.0.0.0rc1

This issue was fixed in the openstack/kolla 9.0.0.0rc1 release candidate.

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.