gsss charm doesn't handle missing object-store endpoint properly

Bug #1938069 reported by Vladimir Grevtsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance-Simplestreams-Sync Charm
Fix Released
Medium
Dmitrii Shcherbakov

Bug Description

One of the clouds I'm working on doesn't have an object store endpoint by design (there's no Ceph/RadosGW/Swift; images are stored in external S3-compliant storage).

After the changes introduced by LP: #1843486, even with use_swift=False, it doesn't start image sync with the following error:

INFO * 07-26 16:16:02 [PID:706977] * root * ps_service_exists=True, charm_conf['use_swift']=False, swift_exists=False
INFO * 07-26 16:16:02 [PID:706977] * root * Not updating product streams service.
INFO * 07-26 16:16:02 [PID:706977] * root * Beginning image sync
INFO * 07-26 16:16:02 [PID:706977] * root * Executing command: ['juju-run', 'glance-simplestreams-sync/0', 'status-set maintenance "Synchronising images"']
INFO * 07-26 16:16:02 [PID:706977] * root * Configuring sync for url {'url': 'http://cloud-images.ubuntu.com/releases/', 'name_prefix': 'ubuntu:released', 'path': 'streams/v1/index.sjson', 'max': 1, 'item_filters': ['release~(bionic|focal)', 'arch~(x86_64|amd64)', 'ftype~(disk1.img|disk.img)']}
INFO * 07-26 16:16:02 [PID:706977] * root * Executing command: ['juju-run', 'glance-simplestreams-sync/0', 'env']
ERROR * 07-26 16:16:02 [PID:706977] * root * could not retrieve any object-store endpoints
INFO * 07-26 16:16:02 [PID:706977] * root * sync done.
INFO * 07-26 16:17:01 [PID:707407] * root * glance-simplestreams-sync started.

This could be workarounded by setting ignore_proxy_for_object_store to False, although, it wasn't so obvious. Probably, should we consider making this endpoint optional?

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

I think the possibility of not having object-store in the cloud should be taken into account.

There is an existing option (set to True by default) which is related, however, its deprecated for removal to avoid having to manage an apache2 instance:

  use_swift:
    type: boolean
    default: True
    description: >
      DEPRECATED FOR REMOVAL
      Should the charm set up the product-streams endpoint with swift's URLs?
      If this value is set to False, product-streams metadata will be hosted
      on a local Apache server running on the unit and endpoints will be
      registered referencing the local unit. This does not support HA
      or TLS and is for testing purposes only.

Changed in charm-glance-simplestreams-sync:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :

> There is an existing option (set to True by default) which is related, however, its deprecated for removal to avoid having to manage an apache2 instance:

Indeed. But, for the reference, it was also configured to False (otherwise the gsss.py script would not start).

description: updated
Changed in charm-glance-simplestreams-sync:
status: Triaged → In Progress
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Changed in charm-glance-simplestreams-sync:
milestone: none → 21.10
assignee: nobody → Dmitrii Shcherbakov (dmitriis)
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/+/806579
Committed: https://opendev.org/openstack/charm-glance-simplestreams-sync/commit/d1f8c4ba4cec4324ef9edc91c357672349176dfc
Submitter: "Zuul (22348)"
Branch: master

commit d1f8c4ba4cec4324ef9edc91c357672349176dfc
Author: Dmitrii Shcherbakov <email address hidden>
Date: Mon Aug 30 16:17:32 2021 +0300

    Remove local apache2 install, rework use_swift

    The functionality of use_swift where a local apache2 instance was set up
    for metadata was deprecated for removal and this change actually removes
    this. However, the option itself can still be used as an indicator
    whether Swift is intended to be used for simplestreams metadata or not.
    If the usage is explicitly requested, the charm but Swift endpoints are
    not yet present, the charm will now will set the unit state to
    maintenance in addition to local logging that was done previously.

    Swift presence checking is now endpoint-based instead of being
    service-based (no use for the case where endpoints are not set up while
    the service is in the catalog).

    The lack of swift presence is also ignored for the purposes of
    generating proxy setting context - if the endpoint is not there there is
    not point in trying to generate NO_PROXY rules for it.

    This change also makes test bundles use ceph as a storage medium for
    glance since out of space errors were encountered during testing as the
    glance unit was running out of space for image storage.

    Closes-Bug: #1942047
    Closes-Bug: #1934563
    Closes-Bug: #1938069

    Change-Id: I6519b1449806ad19ee4545501bc4631c9f8e535f

Changed in charm-glance-simplestreams-sync:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance-simplestreams-sync (stable/21.04)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance-simplestreams-sync (stable/21.04)

Reviewed: https://review.opendev.org/c/openstack/charm-glance-simplestreams-sync/+/810811
Committed: https://opendev.org/openstack/charm-glance-simplestreams-sync/commit/87d8f0b30909702c67799c27f985d6b325d4fc0e
Submitter: "Zuul (22348)"
Branch: stable/21.04

commit 87d8f0b30909702c67799c27f985d6b325d4fc0e
Author: Dmitrii Shcherbakov <email address hidden>
Date: Mon Aug 30 16:17:32 2021 +0300

    Remove local apache2 install, rework use_swift

    The functionality of use_swift where a local apache2 instance was set up
    for metadata was deprecated for removal and this change actually removes
    this. However, the option itself can still be used as an indicator
    whether Swift is intended to be used for simplestreams metadata or not.
    If the usage is explicitly requested, the charm but Swift endpoints are
    not yet present, the charm will now will set the unit state to
    maintenance in addition to local logging that was done previously.

    Swift presence checking is now endpoint-based instead of being
    service-based (no use for the case where endpoints are not set up while
    the service is in the catalog).

    The lack of swift presence is also ignored for the purposes of
    generating proxy setting context - if the endpoint is not there there is
    not point in trying to generate NO_PROXY rules for it.

    This change also makes test bundles use ceph as a storage medium for
    glance since out of space errors were encountered during testing as the
    glance unit was running out of space for image storage.

    Closes-Bug: #1942047
    Closes-Bug: #1934563
    Closes-Bug: #1938069

    Change-Id: I6519b1449806ad19ee4545501bc4631c9f8e535f
    (cherry picked from commit d1f8c4ba4cec4324ef9edc91c357672349176dfc)

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