public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static
@ 2022-08-10 15:10 Aaron Lauterer
  2022-08-10 15:10 ` [pve-devel] [PATCH manager 2/2] ui: CephInstall: fix a/an typo Aaron Lauterer
  2022-09-07 13:26 ` [pve-devel] applied: [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Aaron Lauterer @ 2022-08-10 15:10 UTC (permalink / raw)
  To: pve-devel

Removes the possibility to select the node on which to create the first
monitor in the configuration / initialization step and always sets it to
the current node.

This prevents that a user might select another node on which the Ceph
packages have not yet been installed. If a user did that, they would get
an error, but the Ceph config file would have been written. If the user
then does not select a valid node to create the first mon, but aborts
the wizard, they are greeted with a rados_connect error because the
config file exists, but it does not contain any mon infos that are
needed to connect to the Ceph cluster.

Creating a mon manually will remedy such a situation, but especially for
new users, this behavior is not ideal and confusing.

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

diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
index 79b0f4e4..b19d1a5e 100644
--- a/www/manager6/ceph/CephInstallWizard.js
+++ b/www/manager6/ceph/CephInstallWizard.js
@@ -401,11 +401,11 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		    value: gettext('First Ceph monitor') + ':',
 		},
 		{
-		    xtype: 'pveNodeSelector',
+		    xtype: 'displayfield',
 		    fieldLabel: gettext('Monitor node'),
-		    name: 'mon-node',
-		    selectCurNode: true,
-		    allowBlank: false,
+		    cbind: {
+			value: '{nodename}',
+		    },
 		},
 		{
 		    xtype: 'displayfield',
@@ -461,8 +461,6 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		    var wizard = me.up('window');
 		    var kv = wizard.getValues();
 		    delete kv.delete;
-		    var monNode = kv['mon-node'];
-		    delete kv['mon-node'];
 		    var nodename = me.nodename;
 		    delete kv.nodename;
 		    Proxmox.Utils.API2Request({
@@ -472,7 +470,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 			params: kv,
 			success: function() {
 			    Proxmox.Utils.API2Request({
-				url: `/nodes/${monNode}/ceph/mon/${monNode}`,
+				url: `/nodes/${nodename}/ceph/mon/${nodename}`,
 				waitMsgTarget: wizard,
 				method: 'POST',
 				success: function() {
-- 
2.30.2





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

* [pve-devel] [PATCH manager 2/2] ui: CephInstall: fix a/an typo
  2022-08-10 15:10 [pve-devel] [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Aaron Lauterer
@ 2022-08-10 15:10 ` Aaron Lauterer
  2022-09-07 13:28   ` [pve-devel] applied: " Thomas Lamprecht
  2022-09-07 13:26 ` [pve-devel] applied: [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Aaron Lauterer @ 2022-08-10 15:10 UTC (permalink / raw)
  To: pve-devel

and switch to template string

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
the spaces should still be where we need them due to the string being
multi line.

if we don't want to use them like this, drop this patch, but please fix
the a/an typo :)

 www/manager6/window/CephInstall.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/window/CephInstall.js b/www/manager6/window/CephInstall.js
index 1b8abc41..432c6719 100644
--- a/www/manager6/window/CephInstall.js
+++ b/www/manager6/window/CephInstall.js
@@ -34,9 +34,9 @@ Ext.define('PVE.ceph.Install', {
 	    },
 	    windowText: function(get) {
 		if (get('isInstalled')) {
-		    return '<p class="install-mask">' +
-		    Ext.String.format(gettext('{0} is not initialized.'), 'Ceph') + ' '+
-		    gettext('You need to create a initial config once.') + '</p>';
+		    return `<p class="install-mask">
+		    ${Ext.String.format(gettext('{0} is not initialized.'), 'Ceph')}
+		    ${gettext('You need to create an initial config once.')}</p>`;
 		} else {
 		    return '<p class="install-mask">' +
 		    Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
-- 
2.30.2





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

* [pve-devel] applied: [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static
  2022-08-10 15:10 [pve-devel] [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Aaron Lauterer
  2022-08-10 15:10 ` [pve-devel] [PATCH manager 2/2] ui: CephInstall: fix a/an typo Aaron Lauterer
@ 2022-09-07 13:26 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-09-07 13:26 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 10/08/2022 um 17:10 schrieb Aaron Lauterer:
> Removes the possibility to select the node on which to create the first
> monitor in the configuration / initialization step and always sets it to
> the current node.
> 
> This prevents that a user might select another node on which the Ceph
> packages have not yet been installed. If a user did that, they would get
> an error, but the Ceph config file would have been written. If the user
> then does not select a valid node to create the first mon, but aborts
> the wizard, they are greeted with a rados_connect error because the
> config file exists, but it does not contain any mon infos that are
> needed to connect to the Ceph cluster.
> 
> Creating a mon manually will remedy such a situation, but especially for
> new users, this behavior is not ideal and confusing.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  www/manager6/ceph/CephInstallWizard.js | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
>

applied, thanks!




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

* [pve-devel] applied: [PATCH manager 2/2] ui: CephInstall: fix a/an typo
  2022-08-10 15:10 ` [pve-devel] [PATCH manager 2/2] ui: CephInstall: fix a/an typo Aaron Lauterer
@ 2022-09-07 13:28   ` Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-09-07 13:28 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 10/08/2022 um 17:10 schrieb Aaron Lauterer:
> and switch to template string
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> the spaces should still be where we need them due to the string being
> multi line.
> 
> if we don't want to use them like this, drop this patch, but please fix
> the a/an typo :)

just sent the typo fix instead next time?! If you really want to move
existing code to template string (not much valueadd in this case) do
so in a follow up fix after fixing the typo as those things are semantically
completely unrelated, iow. two patches.

> 
>  www/manager6/window/CephInstall.js | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
>

applied, thanks!




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

end of thread, other threads:[~2022-09-07 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 15:10 [pve-devel] [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Aaron Lauterer
2022-08-10 15:10 ` [pve-devel] [PATCH manager 2/2] ui: CephInstall: fix a/an typo Aaron Lauterer
2022-09-07 13:28   ` [pve-devel] applied: " Thomas Lamprecht
2022-09-07 13:26 ` [pve-devel] applied: [PATCH manager 1/2] ui: CephInstallWizard: make first mon node static Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal