charm-ceph-radosgw:stable/21.04

Last commit made on 2021-07-02
Get this branch:
git clone -b stable/21.04 https://git.launchpad.net/charm-ceph-radosgw

Branch merges

Branch information

Name:
stable/21.04
Repository:
lp:charm-ceph-radosgw

Recent commits

c80419a... by Corey Bryant

c-h sync - restore proxy env vars for add-apt-repository

Change-Id: Ifacb64c08555f54ee832d3e971e032b4c4152747

050717d... by Aurelien Lourot

Updates for stable branch creation

Set default branch for git review/gerrit.

Update test bundles to point to openstack-charmers.

Change-Id: Ib4e8779ef8e3e0fa5225d39bd47a6906f12c19bf

358121d... by Mauricio Faria de Oliveira

Ensure identical types for comparing port number/string

Fix an oversight and regression in commit c97fced7947e
("Close previously opened ports on port config change").

The comparison between an integer and a string (returned
by .split()) is always different and thus when upgrading
the charm 'port 80' is closed.

Make sure the types are set to str. Right now it should
only be needed for port and not opened_port_number; but
let's future proof both sides of the comparison.

(Update: using str() vs int() as apparently int() might
fail but str() should always work no matter what it got;
thanks, Alex Kavanagh!)

Before:

    $ juju run --unit ceph-radosgw/0 opened-ports
    80/tcp

    $ juju upgrade-charm --path . ceph-radosgw

    $ juju run --unit ceph-radosgw/0 opened-ports
    $

    @ log:
    2021-04-05 15:08:04 INFO juju-log Closed port 80 in favor of port 80

    $ python3 -q
    >>> x=80
    >>> y='80/tcp'
    >>> z=y.split('/')[0]
    >>> z
    '80'
    >>> x
    80
    >>> x != z
    True
    >>> x=str(x)
    >>> x != z
    False

After:

    $ juju run --unit ceph-radosgw/1 opened-ports
    80/tcp

    $ juju upgrade-charm --path . ceph-radosgw

    $ juju run --unit ceph-radosgw/1 opened-ports
    80/tcp

Signed-off-by: Mauricio Faria de Oliveira <email address hidden>
Change-Id: I2bcdfec1459ea45d8f57b850b7fd935c360cc7c1

73c0969... by Alex Kavanagh

21.04 sync - add 'hirsute' in UBUNTU_RELEASES

The 'hirsute' key in c-h/core/host_factory/ubuntu.py:
UBUNTU_RELEASES had been missed out, and is needed for
hirsute support in many of the charms. This sync is to
add just that key. See also [1]

Note that this sync is only for classic charms.

[1] https://github.com/juju/charm-helpers/pull/598

Change-Id: I8544b62b2c7e5f38488f564af57dbe815638bf32

ff894ba... by Zuul <email address hidden>

Merge "21.04 libraries freeze for charms on master branch"

44936bf... by Mauricio Faria de Oliveira

Remove endpoint settings without service prefix on config-changed

Older charms pass endpoint data with the legacy method, without
service prefix (e.g., `admin_url` instead of `swift_admin_url`.)

After charm upgrade the endpoint data is set in the new method,
with service prefix, however the legacy endpoint data is still
there as it has not been removed.

The keystone charms checks first for the legacy method, and if
it's found, the new method is ignored and any endpoint changes
made on the new charm (e.g., port) are not implemented.

So make sure to remove the legacy endpoint settings from the
relation, so the keystone charm can pick up eg, port changes,
and even set up the s3 endpoint after charm upgrades between
the legacy method and the new method.

Simplied test-case:

- Old charm:

    $ juju deploy cs:ceph-radosgw-285 # + keystone/percona-cluster

    $ openstack endpoint list --service swift
    | ... | http://10.5.2.210:80/swift |

    $ juju config ceph-radosgw port=1111

    $ openstack endpoint list --service swift
    | ... | http://10.5.2.210:1111/swift |

- New charm:

    $ juju upgrade-charm ceph-radosgw

    $ juju config ceph-radosgw port=2222

    unit-keystone-0: 12:37:16 INFO unit.keystone/0.juju-log identity-service:6:
     {'admin_url': 'http://10.5.2.210:1111/swift', ...
      'swift_admin_url': 'http://10.5.2.210:2222/swift',
      'service': 'swift', ...}

    $ openstack endpoint list --service swift
    | ... | http://10.5.2.210:1111/swift |

- Patched charm:

    $ juju upgrade-charm --path ~/charm-ceph-radosgw ceph-radosgw

    $ juju config ceph-radosgw port=3333
    ...
    unit-keystone-0: 12:40:46 INFO unit.keystone/0.juju-log identity-service:6:
     endpoint: s3
     {'admin_url': 'http://10.5.2.210:3333/', ..., 'service': 's3'}
     endpoint: swift
     {'admin_url': 'http://10.5.2.210:3333/swift', ..., 'service': 'swift'}

    $ openstack endpoint list --service swift
    | ... | http://10.5.2.210:3333/swift |

    $ openstack endpoint list --service s3
    | ... | http://10.5.2.210:3333/ |

Signed-off-by: Mauricio Faria de Oliveira <email address hidden>
Closes-bug: #1887722
Change-Id: Iaf3005b6507914004b6c9dcbb77957e0230fb4f4

916fbd4... by Alex Kavanagh

21.04 libraries freeze for charms on master branch

* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure stable/21.04 branch for charms.openstack
  - ensure stable/21.04 branch for charm-helpers

Change-Id: I6c46959aa659454d28880e375e3488058227dca7

c97fced... by Mauricio Faria de Oliveira

Close previously opened ports on port config change

When the charm config option `port` is changed,
the previously opened port is not closed.

This leads to leaks of open ports (potential security
issue), and long ports field on status after tests:

Test:

    $ juju config ceph-radosgw port=1111
    $ juju config ceph-radosgw port=2222
    $ juju config ceph-radosgw port=3333

    $ juju status ceph-radosgw
    ...
    Unit Workload Agent Machine Public address Ports Message
    ceph-radosgw/1* blocked idle 3 10.5.2.210
    80/tcp,1111/tcp,2222/tcp,3333/tcp Missing relations: mon
    ...

    $ juju run --unit ceph-radosgw/1 'opened-ports'
    80/tcp
    1111/tcp
    2222/tcp
    3333/tcp

Patched:

    $ juju run --unit ceph-radosgw/1 'opened-ports'
    80/tcp
    1111/tcp
    1234/tcp
    2222/tcp
    3333/tcp
    33331/tcp
    33332/tcp
    33334/tcp

    $ juju config ceph-radosgw port=33335

    $ juju run --unit ceph-radosgw/1 'opened-ports'
    33335/tcp

    $ juju status ceph-radosgw
    ...
    Unit Workload Agent Machine Public address Ports
    Message
    ceph-radosgw/1* blocked idle 3 10.5.2.210 33335/tcp
    Missing relations: mon

    @ unit log
    2021-03-24 13:20:51 INFO juju-log Closed port 80 in favor of port 33335
    2021-03-24 13:20:51 INFO juju-log Closed port 1111 in favor of port 33335
    2021-03-24 13:20:51 INFO juju-log Closed port 1234 in favor of port 33335
    2021-03-24 13:20:51 INFO juju-log Closed port 2222 in favor of port 33335
    2021-03-24 13:20:52 INFO juju-log Closed port 3333 in favor of port 33335
    2021-03-24 13:20:52 INFO juju-log Closed port 33331 in favor of port 33335
    2021-03-24 13:20:52 INFO juju-log Closed port 33332 in favor of port 33335
    2021-03-24 13:20:52 INFO juju-log Closed port 33334 in favor of port 33335

Signed-off-by: Mauricio Faria de Oliveira <email address hidden>
Closes-bug: #1921131
Change-Id: I5ac4b66137faffee82ae0f1e13718f21274f1f56

5ab45ee... by Zuul <email address hidden>

Merge "Add new osci.yaml"

9adb03d... by Chris MacNaughton

Add new osci.yaml

This change is preparatory to migration Ubuntu OpenStack CI
from Jenkins to Zuul

Change-Id: I16e82e0f295a9c0f6f21e4ff343e2f1afda1d82d