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.laute...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to