Discussion:
[pve-devel] [PATCH manager 1/3] pveceph: ensure ceph-fuse gets uptdated when installing ceph server
Thomas Lamprecht
2018-11-26 17:22:28 UTC
Permalink
as we depend on ceph-fuse elsewhere (pve-storage) this gets installed
from Debians repositories with the Ceph 10 version.
So ensure that an up to date version, from our current supported Ceph
release, gets installed when doing `pveceph install` else you may
fall into certain issues which would have been already resolved with
a newer version.

Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
PVE/CLI/pveceph.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index 11f20683..5bb4c849 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -140,7 +140,7 @@ __PACKAGE__->register_method ({
system('apt-get', '--no-install-recommends',
'-o', 'Dpkg::Options::=--force-confnew',
'install', '--',
- 'ceph', 'ceph-common', 'ceph-mds', 'gdisk');
+ 'ceph', 'ceph-common', 'ceph-mds', 'ceph-fuse', 'gdisk');

if (PVE::CephTools::systemd_managed() && ! -e '/etc/systemd/system/ceph.service') {
#to disable old SysV init scripts.
--
2.19.1
Thomas Lamprecht
2018-11-26 17:22:29 UTC
Permalink
no point in recreating one, we have an active one from earlier

Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---
PVE/API2/Ceph/FS.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Ceph/FS.pm b/PVE/API2/Ceph/FS.pm
index f934bbc1..9915faaa 100644
--- a/PVE/API2/Ceph/FS.pm
+++ b/PVE/API2/Ceph/FS.pm
@@ -191,7 +191,7 @@ __PACKAGE__->register_method ({
print "Adding '$fs_name' to storage configuration...\n";

my $waittime = 0;
- while (!PVE::CephTools::is_any_mds_active()) {
+ while (!PVE::CephTools::is_any_mds_active($rados)) {
if ($waittime >= 10) {
die "Need MDS to add storage, but none got active!\n";
}
--
2.19.1
Thomas Lamprecht
2018-11-26 17:22:30 UTC
Permalink
Introduce the mdsCount again, I know remember again why I had it in
v3 of my CephFS series.. Use this to disable the CephFS create button
if we have no MDS configured, as this is a requirement.
Further change the gettext for 'No XY configure' to a format string
so that it can be reused.

Signed-off-by: Thomas Lamprecht <***@proxmox.com>
---

while the latter is not directly related it can be seen as 'notify
the user about no configured MDS' a bit better, so all in one patch.

www/manager6/ceph/FS.js | 37 ++++++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 11 deletions(-)

diff --git a/www/manager6/ceph/FS.js b/www/manager6/ceph/FS.js
index d67eec37..4e8dc9f9 100644
--- a/www/manager6/ceph/FS.js
+++ b/www/manager6/ceph/FS.js
@@ -114,7 +114,7 @@ Ext.define('PVE.NodeCephFSPanel', {
xtype: 'pveNodeCephFSPanel',
mixins: ['Proxmox.Mixin.CBind'],

- title: gettext('Cluster Administration'),
+ title: gettext('CephFS'),
onlineHelp: 'chapter_pvecm',

border: false,
@@ -125,17 +125,23 @@ Ext.define('PVE.NodeCephFSPanel', {
}
},

+ viewModel: {
+ parent: null,
+ data: {
+ cephfsConfigured: false,
+ mdsCount: 0
+ },
+ formulas: {
+ canCreateFS: function(get) {
+ return (!get('cephfsConfigured') && get('mdsCount') > 0);
+ }
+ }
+ },
+
items: [
{
xtype: 'grid',
- title: gettext('CephFS'),
- viewModel: {
- parent: null,
- data: {
- cephfsConfigured: false
- }
- },
- emptyText: gettext('No CephFS configured.'),
+ emptyText: Ext.String.format(gettext('No {0} configured.'), 'CephFS'),
controller: {
xclass: 'Ext.app.ViewController',

@@ -190,7 +196,7 @@ Ext.define('PVE.NodeCephFSPanel', {
handler: 'onCreate',
bind: {
// only one CephFS per Ceph cluster makes sense for now
- disabled: '{cephfsConfigured}'
+ disabled: '{!canCreateFS}'
}
}
],
@@ -218,6 +224,7 @@ Ext.define('PVE.NodeCephFSPanel', {
{
xtype: 'grid',
title: gettext('Metadata Servers'),
+ emptyText: Ext.String.format(gettext('No {0} configured.'), 'MDS'),
controller: {
xclass: 'Ext.app.ViewController',

@@ -238,9 +245,17 @@ Ext.define('PVE.NodeCephFSPanel', {
}
}));
Proxmox.Utils.monStoreErrors(view, view.rstore);
+ view.rstore.on('load', this.onLoad, this);
view.on('destroy', view.rstore.stopUpdate);
},
-
+ onLoad: function(store, records, success) {
+ var vm = this.getViewModel();
+ if (!success || !records) {
+ vm.set('mdsCount', 0);
+ return;
+ }
+ vm.set('mdsCount', records.length);
+ },
onCreateMDS: function() {
var view = this.getView();
view.rstore.stopUpdate();
--
2.19.1
Dominik Csapak
2018-11-27 13:06:39 UTC
Permalink
Post by Thomas Lamprecht
Introduce the mdsCount again, I know remember again why I had it in
v3 of my CephFS series.. Use this to disable the CephFS create button
if we have no MDS configured, as this is a requirement.
Further change the gettext for 'No XY configure' to a format string
so that it can be reused.
---
while the latter is not directly related it can be seen as 'notify
the user about no configured MDS' a bit better, so all in one patch.
www/manager6/ceph/FS.js | 37 ++++++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/www/manager6/ceph/FS.js b/www/manager6/ceph/FS.js
index d67eec37..4e8dc9f9 100644
--- a/www/manager6/ceph/FS.js
+++ b/www/manager6/ceph/FS.js
@@ -114,7 +114,7 @@ Ext.define('PVE.NodeCephFSPanel', {
xtype: 'pveNodeCephFSPanel',
mixins: ['Proxmox.Mixin.CBind'],
- title: gettext('Cluster Administration'),
+ title: gettext('CephFS'),
onlineHelp: 'chapter_pvecm',
border: false,
@@ -125,17 +125,23 @@ Ext.define('PVE.NodeCephFSPanel', {
}
},
+ viewModel: {
+ parent: null,
+ data: {
+ cephfsConfigured: false,
+ mdsCount: 0
+ },
+ formulas: {
+ canCreateFS: function(get) {
+ return (!get('cephfsConfigured') && get('mdsCount') > 0);
+ }
+ }
+ },
+
items: [
{
xtype: 'grid',
- title: gettext('CephFS'),
- viewModel: {
- parent: null,
- data: {
- cephfsConfigured: false
- }
- },
- emptyText: gettext('No CephFS configured.'),
+ emptyText: Ext.String.format(gettext('No {0} configured.'), 'CephFS'),
controller: {
xclass: 'Ext.app.ViewController',
@@ -190,7 +196,7 @@ Ext.define('PVE.NodeCephFSPanel', {
handler: 'onCreate',
bind: {
// only one CephFS per Ceph cluster makes sense for now
- disabled: '{cephfsConfigured}'
+ disabled: '{!canCreateFS}'
}
}
],
@@ -218,6 +224,7 @@ Ext.define('PVE.NodeCephFSPanel', {
{
xtype: 'grid',
title: gettext('Metadata Servers'),
+ emptyText: Ext.String.format(gettext('No {0} configured.'), 'MDS'),
controller: {
xclass: 'Ext.app.ViewController',
@@ -238,9 +245,17 @@ Ext.define('PVE.NodeCephFSPanel', {
}
}));
Proxmox.Utils.monStoreErrors(view, view.rstore);
+ view.rstore.on('load', this.onLoad, this);
view.on('destroy', view.rstore.stopUpdate);
},
-
+ onLoad: function(store, records, success) {
+ var vm = this.getViewModel();
+ if (!success || !records) {
+ vm.set('mdsCount', 0);
+ return;
+ }
+ vm.set('mdsCount', records.length);
+ },
onCreateMDS: function() {
var view = this.getView();
view.rstore.stopUpdate();
Thomas Lamprecht
2018-11-27 14:27:40 UTC
Permalink
Post by Thomas Lamprecht
as we depend on ceph-fuse elsewhere (pve-storage) this gets installed
from Debians repositories with the Ceph 10 version.
So ensure that an up to date version, from our current supported Ceph
release, gets installed when doing `pveceph install` else you may
fall into certain issues which would have been already resolved with
a newer version.
---
PVE/CLI/pveceph.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index 11f20683..5bb4c849 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -140,7 +140,7 @@ __PACKAGE__->register_method ({
system('apt-get', '--no-install-recommends',
'-o', 'Dpkg::Options::=--force-confnew',
'install', '--',
- 'ceph', 'ceph-common', 'ceph-mds', 'gdisk');
+ 'ceph', 'ceph-common', 'ceph-mds', 'ceph-fuse', 'gdisk');
if (PVE::CephTools::systemd_managed() && ! -e '/etc/systemd/system/ceph.service') {
#to disable old SysV init scripts.
applied all three patches with Dominik's R-b and T-b on the ui patch (the other ones were
rather straight forward)

Loading...