Skip to content

Commit 2d6eabe

Browse files
authored
Merge pull request #203 from stackhpc/upstream/master-2025-05-26
Synchronise master with upstream
2 parents fb9518e + ef1a554 commit 2d6eabe

File tree

8 files changed

+34
-67
lines changed

8 files changed

+34
-67
lines changed

doc/source/install/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Magnum Installation Guide
33
=========================
44

5-
65
.. toctree::
76
:maxdepth: 2
87

@@ -22,4 +21,3 @@ configuration.
2221

2322
This chapter assumes a working setup of OpenStack following `OpenStack
2423
Installation Tutorial <https://docs.openstack.org/#install-guides>`_.
25-

doc/source/install/install-guide-from-source.rst

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ Install and configure components
4747
libxml2-devel libxslt-devel postgresql-devel git \
4848
libffi-devel gettext gcc
4949
50-
* openSUSE Leap 42.1
51-
52-
.. code-block:: console
53-
54-
# zypper install git libffi-devel libmysqlclient-devel \
55-
libopenssl-devel libxml2-devel libxslt-devel \
56-
postgresql-devel python-devel gettext-runtime gcc
57-
5850
b. Create magnum user and necessary directories:
5951

6052
* Create user:
@@ -179,8 +171,7 @@ Finalize installation
179171

180172
#. Create init scripts and services:
181173

182-
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7 or openSUSE
183-
Leap 42.1:
174+
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7:
184175

185176
.. code-block:: console
186177
@@ -192,8 +183,7 @@ Finalize installation
192183
193184
#. Start magnum-api and magnum-conductor:
194185

195-
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7 or openSUSE
196-
Leap 42.1:
186+
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7:
197187

198188
.. code-block:: console
199189
@@ -207,8 +197,7 @@ Finalize installation
207197
208198
#. Verify that magnum-api and magnum-conductor services are running:
209199

210-
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7 or openSUSE
211-
Leap 42.1:
200+
* Ubuntu 16.04 or higher, Fedora 21 or higher/RHEL 7/CentOS 7:
212201

213202
.. code-block:: console
214203
@@ -242,13 +231,6 @@ Install the command-line client
242231
# apt install python-dev libssl-dev python-virtualenv \
243232
libffi-dev git gcc
244233
245-
* openSUSE Leap 42.1
246-
247-
.. code-block:: console
248-
249-
# zypper install python-devel libopenssl-devel python-virtualenv \
250-
libffi-devel git gcc
251-
252234
#. Install the client in a virtual environment:
253235

254236
.. code-block:: console

doc/source/install/install-obs.rst

Lines changed: 0 additions & 36 deletions
This file was deleted.

doc/source/install/install.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Optionally, you can install the following components:
4949
:maxdepth: 2
5050

5151
install-debian-manual.rst
52-
install-obs.rst
5352
install-rdo.rst
5453
install-ubuntu.rst
5554
install-guide-from-source.rst

magnum/api/controllers/v1/cluster_template.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,16 @@ def post(self, cluster_template):
429429
do_raise=False):
430430
raise exception.ClusterTemplatePublishDenied()
431431

432+
# explicitly define labels as empty dict if not defined
433+
cluster_template_dict.setdefault("labels", {})
434+
432435
# check root volume size
433-
boot_volume_size = cluster_template.labels.get(
436+
boot_volume_size = cluster_template_dict['labels'].get(
434437
'boot_volume_size', CONF.cinder.default_boot_volume_size)
435438
attr_validator.validate_flavor_root_volume_size(
436-
cli, cluster_template.flavor_id, boot_volume_size)
439+
cli, cluster_template_dict['flavor_id'], boot_volume_size)
437440
attr_validator.validate_flavor_root_volume_size(
438-
cli, cluster_template.master_flavor_id, boot_volume_size)
441+
cli, cluster_template_dict['master_flavor_id'], boot_volume_size)
439442

440443
if (cluster_template.docker_storage_driver in ('devicemapper',
441444
'overlay')):

magnum/service/periodic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(self, ctx, cluster):
6767
self.cluster = cluster
6868

6969
def update_status(self):
70-
LOG.debug("Updating status for cluster %s", self.cluster.id)
70+
LOG.debug("Updating status for cluster %s", self.cluster.uuid)
7171
# get the driver for the cluster
7272
cdriver = driver.Driver.get_driver_for_cluster(self.ctx, self.cluster)
7373
# ask the driver to sync status
@@ -85,7 +85,7 @@ def update_status(self):
8585
raise
8686

8787
LOG.debug("Status for cluster %s updated to %s (%s)",
88-
self.cluster.id, self.cluster.status,
88+
self.cluster.uuid, self.cluster.status,
8989
self.cluster.status_reason)
9090
# status update notifications
9191
if self.cluster.status.endswith("_COMPLETE"):
@@ -144,10 +144,10 @@ def _update_health_status(self):
144144
self.cluster.save()
145145

146146
def update_health_status(self):
147-
LOG.debug("Updating health status for cluster %s", self.cluster.id)
147+
LOG.debug("Updating health status for cluster %s", self.cluster.uuid)
148148
self._update_health_status()
149149
LOG.debug("Status for cluster %s updated to %s (%s)",
150-
self.cluster.id, self.cluster.health_status,
150+
self.cluster.uuid, self.cluster.health_status,
151151
self.cluster.health_status_reason)
152152
# TODO(flwang): Health status update notifications?
153153
# end the "loop"

magnum/tests/unit/api/controllers/v1/test_cluster_template.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,21 @@ def test_create_cluster_template_with_labels(self, mock_image_data):
783783
cc_mock.assert_called_once_with(mock.ANY)
784784
self.assertNotIn('id', cc_mock.call_args[0][0])
785785

786+
@mock.patch('magnum.api.attr_validator.validate_image')
787+
def test_create_cluster_template_without_labels(self, mock_image_data):
788+
with mock.patch.object(
789+
self.dbapi, 'create_cluster_template',
790+
wraps=self.dbapi.create_cluster_template) as cc_mock:
791+
mock_image_data.return_value = {'name': 'mock_name',
792+
'os_distro': 'fedora-coreos'}
793+
bdict = apiutils.cluster_template_post_data()
794+
bdict.pop("labels")
795+
response = self.post_json('/clustertemplates', bdict)
796+
self.assertEqual(dict(),
797+
response.json['labels'])
798+
cc_mock.assert_called_once_with(mock.ANY)
799+
self.assertNotIn('id', cc_mock.call_args[0][0])
800+
786801
@mock.patch('magnum.api.attr_validator.validate_image')
787802
def test_create_cluster_template_with_docker_volume_size(self,
788803
mock_image_data):
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
other:
3+
- |
4+
When debug logging is enabled, periodic update logging will
5+
now output Cluster UUID instead of database ID to better
6+
identify the object being updated.

0 commit comments

Comments
 (0)