From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Aaron Lauterer <a.lauterer@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] ui: CephInstallWizard: avoid using localhost on first configuration
Date: Thu, 20 Apr 2023 14:01:33 +0200 [thread overview]
Message-ID: <1a5b620b-13e1-3c6e-5d1c-10fac6e6d5d2@proxmox.com> (raw)
In-Reply-To: <20230419154348.4099167-1-a.lauterer@proxmox.com>
On 4/19/23 17:43, Aaron Lauterer wrote:
> 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`,
i'd do that in PVE.Utils.monitor_ceph_installed
since that's the point where we introduce the localhost in the first place
and is used for all uses of the install wizard
next prev parent reply other threads:[~2023-04-20 12:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 15:43 Aaron Lauterer
2023-04-20 12:01 ` Dominik Csapak [this message]
2023-04-20 12:09 ` Aaron Lauterer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a5b620b-13e1-3c6e-5d1c-10fac6e6d5d2@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox