sync-images action report success on failure

Bug #1929668 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance-Simplestreams-Sync Charm
Fix Released
Medium
Frode Nordahl

Bug Description

$ juju run-action --wait glance-simplestreams-sync/0 sync-images
unit-glance-simplestreams-sync-0:
  UnitId: glance-simplestreams-sync/0
  id: "2"
  results:
    Stderr: |
      /usr/share/glance-simplestreams-sync/glance_simplestreams_sync.py:109: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
        confobj = yaml.load(f)
      /usr/lib/python3/dist-packages/keystoneauth1/adapter.py:235: UserWarning: Using keystoneclient sessions has been deprecated. Please update your software to use keystoneauth1.
        warnings.warn('Using keystoneclient sessions has been deprecated. '
  status: completed
  timing:
    completed: 2021-05-26 08:21:29 +0000 UTC
    enqueued: 2021-05-26 08:21:23 +0000 UTC
    started: 2021-05-26 08:21:24 +0000 UTC

INFO * 05-26 08:21:28 [PID:11789] * root * Swift not yet ready.

$ juju run-action --wait glance-simplestreams-sync/0 sync-images
unit-glance-simplestreams-sync-0:
  UnitId: glance-simplestreams-sync/0
  id: "4"
  results:
    Stderr: |
      Traceback (most recent call last):
        File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 185, in <module>
          main()
        File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 181, in main
          tmirror.sync(smirror, args.path)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 91, in sync
          return self.sync_index(reader, path, data, content)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 254, in sync_index
          self.sync(reader, path=epath)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 85, in sync
          content, payload = reader.read_json(path)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 43, in read_json
          return raw, self.policy(content=raw, path=path)
        File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 139, in policy
          return util.read_signed(content, keyring=args.keyring)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 297, in read_signed
          raise e
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 293, in read_signed
          subp(cmd, data=content)
        File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 465, in subp
          raise subprocess.CalledProcessError(rc, args, output=(out, err))
      subprocess.CalledProcessError: Command '['gpgv', '--keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg', '-']' returned non-zero exit status 2.
      /usr/share/glance-simplestreams-sync/glance_simplestreams_sync.py:109: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
        confobj = yaml.load(f)
      /usr/lib/python3/dist-packages/keystoneauth1/adapter.py:235: UserWarning: Using keystoneclient sessions has been deprecated. Please update your software to use keystoneauth1.
        warnings.warn('Using keystoneclient sessions has been deprecated. '
  status: completed
  timing:
    completed: 2021-05-26 08:28:45 +0000 UTC
    enqueued: 2021-05-26 08:28:35 +0000 UTC
    started: 2021-05-26 08:28:37 +0000 UTC

2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 Traceback (most recent call last):
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 185, in <module>
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 main()
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 181, in main
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 tmirror.sync(smirror, args.path)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 91, in sync
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 return self.sync_index(reader, path, data, content)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 254, in sync_index
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 self.sync(reader, path=epath)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 85, in sync
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 content, payload = reader.read_json(path)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/mirrors/__init__.py", line 43, in read_json
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 return raw, self.policy(content=raw, path=path)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/bin/sstream-mirror-glance", line 139, in policy
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 return util.read_signed(content, keyring=args.keyring)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 297, in read_signed
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 raise e
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 293, in read_signed
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 subp(cmd, data=content)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 File "/snap/simplestreams/27/lib/python3.6/site-packages/simplestreams/util.py", line 465, in subp
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 raise subprocess.CalledProcessError(rc, args, output=(out, err))
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 subprocess.CalledProcessError: Command '['gpgv', '--keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg', '-']' returned non-zero exit status 2.
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 /usr/share/glance-simplestreams-sync/glance_simplestreams_sync.py:109: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 confobj = yaml.load(f)
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 /usr/lib/python3/dist-packages/keystoneauth1/adapter.py:235: UserWarning: Using keystoneclient sessions has been deprecated. Please update your software to use keystoneauth1.
2021-05-26 08:28:44 WARNING unit.glance-simplestreams-sync/0.sync-images logger.go:60 warnings.warn('Using keystoneclient sessions has been deprecated. '

Frode Nordahl (fnordahl)
Changed in charm-glance-simplestreams-sync:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance-simplestreams-sync (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance-simplestreams-sync (master)

Reviewed: https://review.opendev.org/c/openstack/charm-glance-simplestreams-sync/+/793128
Committed: https://opendev.org/openstack/charm-glance-simplestreams-sync/commit/8bd1b89b6fd91a9921fd87561a7c8726e02b0fbf
Submitter: "Zuul (22348)"
Branch: master

commit 8bd1b89b6fd91a9921fd87561a7c8726e02b0fbf
Author: Frode Nordahl <email address hidden>
Date: Wed May 26 11:16:40 2021 +0200

    Forward returncode from sync program

    When performing sync from an action, the caller of the action will
    be interested in knowing the result of the operation.

    Move hirsute-wallaby job to experimental pipeline.

    Closes-Bug: #1929668
    Change-Id: I20f20f852af7d1e17c6881ab3720b6cc1c16222a

Changed in charm-glance-simplestreams-sync:
status: In Progress → Fix Committed
Changed in charm-glance-simplestreams-sync:
milestone: none → 21.10
Changed in charm-glance-simplestreams-sync:
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.