all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: CephInstallWizard: avoid using localhost on first configuration
@ 2023-04-19 15:43 Aaron Lauterer
  2023-04-20 12:01 ` Dominik Csapak
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Lauterer @ 2023-04-19 15:43 UTC (permalink / raw)
  To: pve-devel

If a user is accessing the Ceph install wizard via Datacenter -> Ceph
and gets to the configuration part, the variable 'nodename' will be
'localhost'. This means, that the first MON and MGR would be using
'localhost' as their ID.
Therefore fall back to 'Proxmox.NodeName' in that case to create the API
POST request with the actual hostname, resulting in MON and MGR IDs as
we would expect them.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 www/manager6/ceph/CephInstallWizard.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
index 47efe182..0340e396 100644
--- a/www/manager6/ceph/CephInstallWizard.js
+++ b/www/manager6/ceph/CephInstallWizard.js
@@ -404,7 +404,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		    xtype: 'displayfield',
 		    fieldLabel: gettext('Monitor node'),
 		    cbind: {
-			value: '{nodename}',
+			value: get => get('nodename') === 'localhost' ? Proxmox.NodeName : get('nodename'),
 		    },
 		},
 		{
@@ -461,7 +461,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		    var wizard = me.up('window');
 		    var kv = wizard.getValues();
 		    delete kv.delete;
-		    var nodename = me.nodename;
+		    let nodename = me.nodename === 'localhost' ? Proxmox.NodeName : me.nodename;
 		    delete kv.nodename;
 		    Proxmox.Utils.API2Request({
 			url: `/nodes/${nodename}/ceph/init`,
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-20 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19 15:43 [pve-devel] [PATCH manager] ui: CephInstallWizard: avoid using localhost on first configuration Aaron Lauterer
2023-04-20 12:01 ` Dominik Csapak
2023-04-20 12:09   ` Aaron Lauterer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal