subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install']' returned non-zero exit status 100.

Bug #2016893 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Placement Charm
Fix Committed
Medium
Unassigned
Train
Fix Committed
Undecided
Unassigned
Ussuri
Fix Committed
Undecided
Unassigned
Victoria
Fix Committed
Undecided
Unassigned
Wallaby
Fix Committed
Undecided
Unassigned
Xena
Fix Committed
Undecided
Unassigned
Yoga
Fix Committed
Undecided
Unassigned
Zed
Fix Committed
Undecided
Unassigned

Bug Description

The update-status hook is trying to call apt-get when re-rendering the configuration, this is not something that should happen on every update-status hook execution

placement/0* error idle 16 172.16.0.102 8778/tcp hook failed: "update-status"

2023-04-18 06:09:46 ERROR unit.placement/0.juju-log server.go:316 Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-placement-0/charm/reactive/placement_handlers.py", line 57, in render_config
    placement_charm.upgrade_if_available(args)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 982, in upgrade_if_available
    if self.openstack_upgrade_available(self.release_pkg):
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 934, in openstack_upgrade_available
    cur_vers = self.get_os_version_package(package)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 1266, in get_os_version_package
    codename = self.get_os_codename_package(
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 1214, in get_os_codename_package
    self.configure_source()
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 627, in configure_source
    fetch.add_source(source, key)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 706, in add_source
    fn(*m.groups())
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 809, in _add_cloud_distro_check
    _add_cloud_pocket("{}-{}".format(cloud_archive_release, openstack_release))
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 765, in _add_cloud_pocket
    apt_install(filter_installed_packages(['ubuntu-cloud-keyring']),
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 373, in apt_install
    _run_apt_command(cmd, fatal, quiet=quiet)
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 956, in _run_apt_command
    _run_with_retries(
  File "/var/lib/juju/agents/unit-placement-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 933, in _run_with_retries
    result = subprocess.check_call(cmd, env=env, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install']' returned non-zero exit status 100.

Revision history for this message
Felipe Reyes (freyes) wrote :
Changed in charm-placement:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (master)
Changed in charm-placement:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/charm-placement/+/881078

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/charm-placement/+/881079

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/charm-placement/+/881080

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/charm-placement/+/881081

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/charm-placement/+/881082

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/charm-placement/+/881083

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/charm-placement/+/881084

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-placement (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/charm-placement/+/881085

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

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/880753
Committed: https://opendev.org/openstack/charm-placement/commit/7f5e0e5bd123b5265ca69956b47c6417dc3b43af
Submitter: "Zuul (22348)"
Branch: master

commit 7f5e0e5bd123b5265ca69956b47c6417dc3b43af
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881078
Committed: https://opendev.org/openstack/charm-placement/commit/c2f4a1e38de6178f35d530b36c4b35ef88712931
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit c2f4a1e38de6178f35d530b36c4b35ef88712931
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881079
Committed: https://opendev.org/openstack/charm-placement/commit/d8552bacd7940461f98aa25b20dd2eb71d7f7f4a
Submitter: "Zuul (22348)"
Branch: stable/zed

commit d8552bacd7940461f98aa25b20dd2eb71d7f7f4a
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881080
Committed: https://opendev.org/openstack/charm-placement/commit/16ddbb0c856bc4a95a44326462502ea1228ada81
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 16ddbb0c856bc4a95a44326462502ea1228ada81
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881081
Committed: https://opendev.org/openstack/charm-placement/commit/53ac8872f1d5a29bddd6c23d61c5920e92e9c615
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 53ac8872f1d5a29bddd6c23d61c5920e92e9c615
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881082
Committed: https://opendev.org/openstack/charm-placement/commit/1c2cd3a94d242244c862411d0b2059fe5ec9761f
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 1c2cd3a94d242244c862411d0b2059fe5ec9761f
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881083
Committed: https://opendev.org/openstack/charm-placement/commit/3fdf4a66fa9df7a856f454802a1bb82637802095
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 3fdf4a66fa9df7a856f454802a1bb82637802095
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881084
Committed: https://opendev.org/openstack/charm-placement/commit/e0d56e6457a464eb53e059c4e2e5ba0b4c874b7e
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit e0d56e6457a464eb53e059c4e2e5ba0b4c874b7e
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-placement (stable/train)

Reviewed: https://review.opendev.org/c/openstack/charm-placement/+/881085
Committed: https://opendev.org/openstack/charm-placement/commit/97223f60ac9f2d4f250bb94f379f5d301e46a009
Submitter: "Zuul (22348)"
Branch: stable/train

commit 97223f60ac9f2d4f250bb94f379f5d301e46a009
Author: Felipe Reyes <email address hidden>
Date: Tue Apr 18 09:58:25 2023 -0400

    Prevent update-status to run unrequired handlers

    Before the update-status hook would run handlers that are expected to
    run when the configuration changes or relations added/removed.

    The update-status hook doesn't hold the machine lock which makes
    concurrent hook executions possible and seen in the gate where for
    example multiple "apt-get" executions trying to acquire dpkg's lock.

    Closes-Bug: #2016893
    Change-Id: I63bfd9903057cbea2db8de4f1b612601aacb568d

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.