openstack-upgrade action ImportError: No module named 'charmhelpers'

Bug #1802182 reported by Felipe Reyes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance Charm
Fix Released
High
Felipe Reyes
OpenStack Neutron Gateway Charm
Fix Released
High
Felipe Reyes

Bug Description

We were trying to run the openstack-upgrade action and it's failing with this stacktrace

2018-11-06 16:54:49 DEBUG openstack-upgrade Traceback (most recent call last):
2018-11-06 16:54:49 DEBUG openstack-upgrade File "/var/lib/juju/agents/unit-glance-1/charm/actions/openstack-upgrade", line 19, in <module>
2018-11-06 16:54:49 DEBUG openstack-upgrade from charmhelpers.contrib.openstack.utils import (
2018-11-06 16:54:49 DEBUG openstack-upgrade ImportError: No module named 'charmhelpers'

Revision history for this message
Felipe Reyes (freyes) wrote :

This commit[0] removed the symlink from "hooks/charmhelpers" to "../charmhelpers"

[0] https://github.com/openstack/charm-glance/commit/b45cd2ae74d5edb481006d7f4a7d54dec3441ff9

tags: added: sts
Changed in charm-glance:
assignee: nobody → Felipe Reyes (freyes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (master)

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

Changed in charm-glance:
status: New → In Progress
Revision history for this message
Felipe Reyes (freyes) wrote :

I'm adding a new task for neutron-gateway where we are seeing the same root cause for a different stack trace:

2018-11-06 19:25:51 DEBUG openstack-upgrade Traceback (most recent call last):
2018-11-06 19:25:51 DEBUG openstack-upgrade File "/var/lib/juju/agents/unit-neutron-gateway-1/charm/actions/openstack-upgrade", line 10, in <module>
2018-11-06 19:25:51 DEBUG openstack-upgrade from neutron_utils import (
2018-11-06 19:25:51 DEBUG openstack-upgrade File "hooks/neutron_utils.py", line 29, in <module>
2018-11-06 19:25:51 DEBUG openstack-upgrade from charmhelpers.contrib.network.ovs import (
2018-11-06 19:25:51 DEBUG openstack-upgrade ImportError: cannot import name 'enable_ipfix'

tags: added: backport-potential
Felipe Reyes (freyes)
Changed in charm-neutron-gateway:
assignee: nobody → Felipe Reyes (freyes)
Ryan Beisner (1chb1n)
Changed in charm-glance:
importance: Undecided → High
milestone: none → 18.11
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.openstack.org/616357
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=41a046ba82435cde2e3524b529e425bdd42ab52f
Submitter: Zuul
Branch: master

commit 41a046ba82435cde2e3524b529e425bdd42ab52f
Author: Felipe Reyes <email address hidden>
Date: Wed Nov 7 18:48:26 2018 -0300

    Add charm's directory to syspath

    charmhelpers lives in the charm dir and it needs to be added to the
    syspath to allow the openstack-upgrade action find it. This wasn't
    needed until commit b45cd2ae removed the symlink that was left in the
    hooks/ directory for backward compatibility purposes.

    Change-Id: I7be5d16359aa6c78c9241990c3d3b8bab4910538
    Closes-Bug: 1802182

Changed in charm-glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-gateway (master)

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

Changed in charm-neutron-gateway:
status: New → In Progress
David Ames (thedac)
Changed in charm-glance:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-gateway (master)

Reviewed: https://review.openstack.org/616696
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-gateway/commit/?id=25200b5a1611280d5f05854eaeb2d00816428a9f
Submitter: Zuul
Branch: master

commit 25200b5a1611280d5f05854eaeb2d00816428a9f
Author: Felipe Reyes <email address hidden>
Date: Thu Nov 8 18:27:46 2018 -0300

    Add charmhelpers to sys.path in first position for actions

    This patch inserts the hooks directory in the first position to always
    prefer that version over any other available in the system.

    Change-Id: I8d78f0ef9e11f23224e893178c2cd37fdcc42671
    Closes-Bug: 1802182

Changed in charm-neutron-gateway:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-neutron-gateway:
milestone: none → 18.11
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-gateway (stable/18.11)

Fix proposed to branch: stable/18.11
Review: https://review.openstack.org/620134

Changed in charm-neutron-gateway:
milestone: 18.11 → 19.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-gateway (stable/18.11)

Reviewed: https://review.openstack.org/620134
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-gateway/commit/?id=ef5e7a36a9a97b1ef49cc1fde9f7a689b229eebd
Submitter: Zuul
Branch: stable/18.11

commit ef5e7a36a9a97b1ef49cc1fde9f7a689b229eebd
Author: Felipe Reyes <email address hidden>
Date: Thu Nov 8 18:27:46 2018 -0300

    Add charmhelpers to sys.path in first position for actions

    This patch inserts the hooks directory in the first position to always
    prefer that version over any other available in the system.

    Change-Id: I8d78f0ef9e11f23224e893178c2cd37fdcc42671
    Closes-Bug: 1802182
    (cherry picked from commit 25200b5a1611280d5f05854eaeb2d00816428a9f)

Ryan Beisner (1chb1n)
Changed in charm-neutron-gateway:
status: Fix Committed → Fix Released
Changed in charm-glance:
status: Fix Released → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (stable/18.11)

Fix proposed to branch: stable/18.11
Review: https://review.openstack.org/623301

Ryan Beisner (1chb1n)
Changed in charm-neutron-gateway:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (stable/18.11)

Reviewed: https://review.openstack.org/623301
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=67c9cdf20474acbbe79ee3889bfc2d4d30bf519f
Submitter: Zuul
Branch: stable/18.11

commit 67c9cdf20474acbbe79ee3889bfc2d4d30bf519f
Author: Felipe Reyes <email address hidden>
Date: Wed Nov 7 18:48:26 2018 -0300

    Add charm's directory to syspath

    charmhelpers lives in the charm dir and it needs to be added to the
    syspath to allow the openstack-upgrade action find it. This wasn't
    needed until commit b45cd2ae removed the symlink that was left in the
    hooks/ directory for backward compatibility purposes.

    Change-Id: I7be5d16359aa6c78c9241990c3d3b8bab4910538
    Closes-Bug: 1802182
    (cherry picked from commit 41a046ba82435cde2e3524b529e425bdd42ab52f)

Changed in charm-glance:
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.