Updates for 20.08 cycle start for groovy and libs

- Adds groovy to the series in the metadata
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild

Change-Id: Ia822ff2ce73ff46526e74ccc84976ba7a4b0bff5
This commit is contained in:
Alex Kavanagh 2020-06-02 14:22:18 +01:00
parent 85b7716fb8
commit 2c46a99a97
5 changed files with 47 additions and 20 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/make #!/usr/bin/make
PYTHON := /usr/bin/env python PYTHON := /usr/bin/env python3
lint: lint:
@tox -e pep8 @tox -e pep8

View File

@ -225,7 +225,7 @@ SWIFT_CODENAMES = OrderedDict([
('train', ('train',
['2.22.0', '2.23.0']), ['2.22.0', '2.23.0']),
('ussuri', ('ussuri',
['2.24.0']), ['2.24.0', '2.25.0']),
]) ])
# >= Liberty version->codename mapping # >= Liberty version->codename mapping

View File

@ -92,6 +92,7 @@ DEFAULT_PGS_PER_OSD_TARGET = 100
DEFAULT_POOL_WEIGHT = 10.0 DEFAULT_POOL_WEIGHT = 10.0
LEGACY_PG_COUNT = 200 LEGACY_PG_COUNT = 200
DEFAULT_MINIMUM_PGS = 2 DEFAULT_MINIMUM_PGS = 2
AUTOSCALER_DEFAULT_PGS = 32
class OsdPostUpgradeError(Exception): class OsdPostUpgradeError(Exception):
@ -399,16 +400,28 @@ class ReplicatedPool(Pool):
def create(self): def create(self):
if not pool_exists(self.service, self.name): if not pool_exists(self.service, self.name):
nautilus_or_later = cmp_pkgrevno('ceph-common', '14.2.0') >= 0
# Create it # Create it
cmd = ['ceph', '--id', self.service, 'osd', 'pool', 'create', if nautilus_or_later:
self.name, str(self.pg_num)] cmd = [
'ceph', '--id', self.service, 'osd', 'pool', 'create',
'--pg-num-min={}'.format(
min(AUTOSCALER_DEFAULT_PGS, self.pg_num)
),
self.name, str(self.pg_num)
]
else:
cmd = [
'ceph', '--id', self.service, 'osd', 'pool', 'create',
self.name, str(self.pg_num)
]
try: try:
check_call(cmd) check_call(cmd)
# Set the pool replica size # Set the pool replica size
update_pool(client=self.service, update_pool(client=self.service,
pool=self.name, pool=self.name,
settings={'size': str(self.replicas)}) settings={'size': str(self.replicas)})
nautilus_or_later = cmp_pkgrevno('ceph-common', '14.2.0') >= 0
if nautilus_or_later: if nautilus_or_later:
# Ensure we set the expected pool ratio # Ensure we set the expected pool ratio
update_pool(client=self.service, update_pool(client=self.service,
@ -419,13 +432,13 @@ class ReplicatedPool(Pool):
pool=self.name, pool=self.name,
name=self.app_name) name=self.app_name)
except CalledProcessError: except CalledProcessError:
log('Could not set app name for pool {}'.format(self.name, level=WARNING)) log('Could not set app name for pool {}'.format(self.name), level=WARNING)
if 'pg_autoscaler' in enabled_manager_modules(): if 'pg_autoscaler' in enabled_manager_modules():
try: try:
enable_pg_autoscale(self.service, self.name) enable_pg_autoscale(self.service, self.name)
except CalledProcessError as e: except CalledProcessError as e:
log('Could not configure auto scaling for pool {}: {}'.format( log('Could not configure auto scaling for pool {}: {}'.format(
self.name, e, level=WARNING)) self.name, e), level=WARNING)
except CalledProcessError: except CalledProcessError:
raise raise
@ -466,10 +479,24 @@ class ErasurePool(Pool):
k = int(erasure_profile['k']) k = int(erasure_profile['k'])
m = int(erasure_profile['m']) m = int(erasure_profile['m'])
pgs = self.get_pgs(k + m, self.percent_data) pgs = self.get_pgs(k + m, self.percent_data)
nautilus_or_later = cmp_pkgrevno('ceph-common', '14.2.0') >= 0
# Create it # Create it
cmd = ['ceph', '--id', self.service, 'osd', 'pool', 'create', if nautilus_or_later:
self.name, str(pgs), str(pgs), cmd = [
'erasure', self.erasure_code_profile] 'ceph', '--id', self.service, 'osd', 'pool', 'create',
'--pg-num-min={}'.format(
min(AUTOSCALER_DEFAULT_PGS, pgs)
),
self.name, str(pgs), str(pgs),
'erasure', self.erasure_code_profile
]
else:
cmd = [
'ceph', '--id', self.service, 'osd', 'pool', 'create',
self.name, str(pgs), str(pgs),
'erasure', self.erasure_code_profile
]
try: try:
check_call(cmd) check_call(cmd)
try: try:
@ -477,8 +504,7 @@ class ErasurePool(Pool):
pool=self.name, pool=self.name,
name=self.app_name) name=self.app_name)
except CalledProcessError: except CalledProcessError:
log('Could not set app name for pool {}'.format(self.name, level=WARNING)) log('Could not set app name for pool {}'.format(self.name), level=WARNING)
nautilus_or_later = cmp_pkgrevno('ceph-common', '14.2.0') >= 0
if nautilus_or_later: if nautilus_or_later:
# Ensure we set the expected pool ratio # Ensure we set the expected pool ratio
update_pool(client=self.service, update_pool(client=self.service,
@ -489,7 +515,7 @@ class ErasurePool(Pool):
enable_pg_autoscale(self.service, self.name) enable_pg_autoscale(self.service, self.name)
except CalledProcessError as e: except CalledProcessError as e:
log('Could not configure auto scaling for pool {}: {}'.format( log('Could not configure auto scaling for pool {}: {}'.format(
self.name, e, level=WARNING)) self.name, e), level=WARNING)
except CalledProcessError: except CalledProcessError:
raise raise

View File

@ -69,7 +69,7 @@ def _snap_exec(commands):
.format(SNAP_NO_LOCK_RETRY_COUNT)) .format(SNAP_NO_LOCK_RETRY_COUNT))
return_code = e.returncode return_code = e.returncode
log('Snap failed to acquire lock, trying again in {} seconds.' log('Snap failed to acquire lock, trying again in {} seconds.'
.format(SNAP_NO_LOCK_RETRY_DELAY, level='WARN')) .format(SNAP_NO_LOCK_RETRY_DELAY), level='WARN')
sleep(SNAP_NO_LOCK_RETRY_DELAY) sleep(SNAP_NO_LOCK_RETRY_DELAY)
return return_code return return_code

View File

@ -6,13 +6,14 @@ description: |
orchestration engine to launch multiple composite cloud applications based on orchestration engine to launch multiple composite cloud applications based on
templates in the form of text files that can be treated like code. templates in the form of text files that can be treated like code.
tags: tags:
- openstack - openstack
series: series:
- xenial - xenial
- bionic - bionic
- eoan - eoan
- focal - focal
- trusty - trusty
- groovy
extra-bindings: extra-bindings:
public: public:
admin: admin: