Ceph mgr-restful-plugin has new server_port config location

Ceph mgr-restful-plugin was running ceph-mgr on port 8003 instead of
port 7999.

The problem was that mgr-restful-plugin was configuring the server
port at mgr/restful/server_port key in Mimic.
This key has changed to config/mgr/mgr/restful/server_port in
Nautilus.

Test Plan:
 - Tested on AIO-SX using netstat to check the port and curl to get
data using port 7999.

Story: 2009074
Task: 44160

Signed-off-by: Felipe Sanches Zanoni <Felipe.SanchesZanoni@windriver.com>
Change-Id: Ib534089bd30c5b1e2c7db98bbd2f495b1545f420
This commit is contained in:
Felipe Sanches Zanoni 2021-12-09 16:10:04 -05:00
parent 5495664b8c
commit b0b59243b2

View File

@ -725,7 +725,7 @@ class ServiceMonitor(object):
with open(os.devnull, 'wb') as null:
out = self.run_with_timeout(
['/usr/bin/ceph', 'config-key', 'get',
'mgr/restful/server_port'],
'config/mgr/mgr/restful/server_port'],
CONFIG.ceph_cli_timeout_sec, stderr=null)
if out == str(CONFIG.restful_plugin_port):
return True
@ -743,7 +743,7 @@ class ServiceMonitor(object):
LOG.info('Set restful plugin port=%d', CONFIG.restful_plugin_port)
self.run_with_timeout(
['/usr/bin/ceph', 'config-key', 'set',
'mgr/restful/server_port', str(CONFIG.restful_plugin_port)],
'config/mgr/mgr/restful/server_port', str(CONFIG.restful_plugin_port)],
CONFIG.ceph_cli_timeout_sec)
def restful_plugin_has_admin_key(self):