Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncm-ceph: Cleanup pan templates #1750

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ncm-ceph/src/main/resources/tests/profiles/basic_crushmap.pan
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ variable BASE_STEPS = list(
'take', 'default',
'set_chooseleaf_tries', 5,
'choices', list(
dict(
'chtype', 'chooseleaf firstn',
'number', 0,
'bktype', 'host',
dict(
'chtype', 'chooseleaf firstn',
'number', 0,
'bktype', 'host',
),
),
),
Expand Down
36 changes: 20 additions & 16 deletions ncm-ceph/src/test/resources/basic_cluster.pan
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
object template basic_cluster;


variable OSDS = dict (
'ceph001', dict (
variable CEPH_OSDS = dict(
'ceph001', dict(
'fqdn', 'ceph001.cubone.os',
'osds', dict(
escape('/var/lib/ceph/osd/sdc'), dict(),
'sdd', dict(
'journal_path', '/var/lib/ceph/log/sda4/osd-sdd/journal'
)
)
),
'ceph002', dict (
)
),
'ceph002', dict(
'fqdn', 'ceph002.cubone.os',
'osds', dict(
'sdc', dict(
'journal_path', '/var/lib/ceph/log/sda4/osd-sdc/journal'
'journal_path', '/var/lib/ceph/log/sda4/osd-sdc/journal'
)
)
)
);

variable MDSS = dict (
variable CEPH_MDSS = dict(
'ceph002', dict(
'fqdn', 'ceph002.cubone.os',
'up', true
Expand All @@ -40,23 +40,23 @@ variable MONITOR3 = dict(
'up', true,
);

variable CONFIG = dict (
variable CONFIG = dict(
'fsid' , 'a94f9906-ff68-487d-8193-23ad04c1b5c4',
'mon_initial_members', list ('ceph001', 'ceph002', 'ceph003')
);

prefix '/software/components/ceph/clusters';

'ceph' = dict (
'ceph' = dict(
'config', CONFIG,
'osdhosts', OSDS,
'mdss', MDSS,
'monitors', dict (
'osdhosts', CEPH_OSDS,
'mdss', CEPH_MDSS,
'monitors', dict(
'ceph001', MONITOR1,
'ceph002', MONITOR2,
'ceph003', MONITOR3
),
'deployhosts', dict (
'deployhosts', dict(
'ceph002', 'ceph002.cubone.os'
)

Expand All @@ -67,6 +67,10 @@ prefix '/software/components/ceph/clusters';
'/system/network/hostname' = 'ceph003';
'/system/network/domainname' = 'cubone.os';

'/software/components/accounts/users/ceph' =
dict('homeDir', '/tmp', 'gid', '111' );
'/software/components/accounts/groups/ceph' = dict('gid', '111');
'/software/components/accounts/users/ceph' = dict(
'homeDir', '/tmp',
'gid', '111',
);
'/software/components/accounts/groups/ceph' = dict(
'gid', '111',
);
30 changes: 15 additions & 15 deletions ncm-ceph/src/test/resources/basic_crushmap.pan
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ variable CEPH_OSD_DISKS = list('sdc', 'sdd', 'sde', 'sdf', 'sdg', 'sdh', 'sdi',
variable CEPH_JOURNAL_DISKS = list('sda4', 'sdb');
variable CEPH_DEFAULT_OSD_WEIGHT = 1.0;

variable MDSS = dict (
variable CEPH_MDSS = dict(
'ceph001.cubone.os', dict(
'fqdn', 'ceph001.cubone.os',
),
),
'ceph002.cubone.os', dict(
'fqdn', 'ceph002.cubone.os',
)
Expand All @@ -30,7 +30,7 @@ variable MONITOR3 = dict(
'fqdn', 'ceph003.cubone.os',
);

variable CONFIG = dict (
variable CONFIG = dict(
'fsid' , '82766e04-585b-49a6-a0ac-c13d9ffd0a7d',
'mon_initial_members', list ('ceph001', 'ceph002', 'ceph003'),
'public_network', '10.141.8.0/20',
Expand All @@ -50,16 +50,16 @@ variable BASE_STEPS = list(
dict(
'take', 'default',
'choices', list(
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
'number', 0,
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
'number', 0,
),
),
),
);

prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix "/software/components/ceph/clusters/ceph/crushmap";

'types' = list('osd', 'host', 'root');

Expand Down Expand Up @@ -103,11 +103,11 @@ prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix '/software/components/ceph/clusters/ceph';
'config' = CONFIG;
'osdhosts' = {
t=dict();
foreach(idx;host;CEPH_HOSTS) {
t = dict();
foreach(idx; host; CEPH_HOSTS) {
d = dict();
foreach(odx;disk;CEPH_OSD_DISKS) {
jdx= odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
foreach(odx; disk; CEPH_OSD_DISKS) {
jdx = odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
d[disk] = dict(
'journal_path', format('/var/lib/ceph/log/%s/osd-%s/journal', CEPH_JOURNAL_DISKS[jdx], disk),
'crush_weight', CEPH_DEFAULT_OSD_WEIGHT
Expand All @@ -121,12 +121,12 @@ prefix '/software/components/ceph/clusters/ceph';
t;
};

'mdss' = MDSS;
'monitors' = dict (
'mdss' = CEPH_MDSS;
'monitors' = dict(
'ceph001', MONITOR1,
'ceph002', MONITOR2,
'ceph003', MONITOR3
);
'deployhosts' = dict (
'deployhosts' = dict(
'ceph001', 'ceph001.cubone.os',
);
22 changes: 11 additions & 11 deletions ncm-ceph/src/test/resources/basic_crushmap_tt.pan
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ variable CEPH_OSD_DISKS = list('sdc', 'sdd', 'sde', 'sdf', 'sdg', 'sdh', 'sdi',
variable CEPH_JOURNAL_DISKS = list('sda4', 'sdb');
variable CEPH_DEFAULT_OSD_WEIGHT = 1.0;

variable MDSS = dict (
variable CEPH_MDSS = dict (
'ceph001.cubone.os', dict(
'fqdn', 'ceph001.cubone.os',
),
),
'ceph002.cubone.os', dict(
'fqdn', 'ceph002.cubone.os',
)
Expand Down Expand Up @@ -48,16 +48,16 @@ variable BASE_STEPS = list(
dict(
'take', 'default',
'choices', list(
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
),
),
),
);


prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix "/software/components/ceph/clusters/ceph/crushmap";

'types' = list('osd', 'host', 'root');

Expand Down Expand Up @@ -94,11 +94,11 @@ prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix '/software/components/ceph/clusters/ceph';
'config' = CONFIG;
'osdhosts' = {
t=dict();
foreach(idx;host;CEPH_HOSTS) {
t = dict();
foreach(idx; host; CEPH_HOSTS) {
d = dict();
foreach(odx;disk;CEPH_OSD_DISKS) {
jdx= odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
foreach(odx; disk; CEPH_OSD_DISKS) {
jdx = odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
d[disk] = dict(
'journal_path', format('/var/lib/ceph/log/%s/osd-%s/journal', CEPH_JOURNAL_DISKS[jdx], disk),
'crush_weight', CEPH_DEFAULT_OSD_WEIGHT
Expand All @@ -112,7 +112,7 @@ prefix '/software/components/ceph/clusters/ceph';
t;
};

'mdss' = MDSS;
'mdss' = CEPH_MDSS;
'monitors' = dict (
'ceph001', MONITOR1,
'ceph002', MONITOR2,
Expand Down
3 changes: 1 addition & 2 deletions ncm-ceph/src/test/resources/basic_radosgw.pan
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ prefix '/software/components/ceph/clusters';
'/system/network/hostname' = 'ceph002';
'/system/network/domainname' = 'cubone.os';

'/software/components/accounts/users/ceph' =
dict('homeDir', '/tmp', 'gid', '111' );
'/software/components/accounts/users/ceph' = dict('homeDir', '/tmp', 'gid', '111');
'/software/components/accounts/groups/ceph' = dict('gid', '111');
26 changes: 13 additions & 13 deletions ncm-ceph/src/test/resources/labeled_crushmap.pan
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ variable CEPH_OSD_DISKS = list('sdc', 'sdd', 'sde', 'sdf', 'sdg', 'sdh', 'sdi',
variable CEPH_JOURNAL_DISKS = list('sda4', 'sdb');
variable CEPH_DEFAULT_OSD_WEIGHT = 1.0;

variable MDSS = dict (
variable CEPH_MDSS = dict (
'ceph001.cubone.os', dict(
'fqdn', 'ceph001.cubone.os',
),
),
'ceph002.cubone.os', dict(
'fqdn', 'ceph002.cubone.os',
)
Expand Down Expand Up @@ -51,16 +51,16 @@ variable BASE_STEPS = list(
dict(
'take', 'default',
'choices', list(
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
'number', 0,
dict(
'chtype', 'chooseleaf firstn',
'bktype', 'host',
'number', 0,
),
),
),
);

prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix "/software/components/ceph/clusters/ceph/crushmap";

'types' = list('osd', 'host', 'root');

Expand Down Expand Up @@ -104,13 +104,13 @@ prefix "/software/components/ceph/clusters/ceph/crushmap/";
prefix '/software/components/ceph/clusters/ceph';
'config' = CONFIG;
'osdhosts' = {
t=dict();
foreach(idx;host;CEPH_HOSTS) {
t = dict();
foreach(idx; host; CEPH_HOSTS) {
d = dict();
foreach(odx;disk;CEPH_OSD_DISKS) {
jdx= odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
foreach(odx; disk; CEPH_OSD_DISKS) {
jdx = odx % length(CEPH_JOURNAL_DISKS); ## RR over journal disks
if (host == 'ceph003') {
jdx=0; # Empty bucket tst-1 on ceph003
jdx = 0; # Empty bucket tst-1 on ceph003
};
d[disk] = dict(
'journal_path', format('/var/lib/ceph/log/%s/osd-%s/journal', CEPH_JOURNAL_DISKS[jdx], disk),
Expand All @@ -126,7 +126,7 @@ prefix '/software/components/ceph/clusters/ceph';
t;
};

'mdss' = MDSS;
'mdss' = CEPH_MDSS;
'monitors' = dict (
'ceph001', MONITOR1,
'ceph002', MONITOR2,
Expand Down
3 changes: 2 additions & 1 deletion ncm-ceph/src/test/resources/tcfgfile.pan
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ prefix '/software/components/ceph/config';
'rgw/client.rgw.test' = dict(
'host', 'host3',
'keyring', 'keyfile',
'rgw_dns_name', 'host3.aaa.be');
'rgw_dns_name', 'host3.aaa.be',
);
17 changes: 10 additions & 7 deletions ncm-ceph/src/test/resources/tcluster.pan
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
template tcluster;

variable MDS_NODES = dict (
variable MDS_NODES = dict(
'ceph002', dict(
'fqdn', 'ceph002.cubone.os',
),
Expand All @@ -27,12 +27,12 @@ bind '/software/components/ceph' = ceph_component;
prefix '/software/components/ceph/cluster';

'mdss' = MDS_NODES;
'monitors' = dict (
'monitors' = dict(
'ceph001', MONITOR1,
'ceph002', MONITOR2,
'ceph003', MONITOR3
);
'deployhosts' = dict (
'deployhosts' = dict(
'ceph002', 'ceph002.cubone.os'
);
'ssh_multiplex' = true;
Expand All @@ -57,7 +57,10 @@ prefix 'configdb';
'/system/network/hostname' = 'ceph002';
'/system/network/domainname' = 'cubone.os';

'/software/components/accounts/users/ceph' =
dict('homeDir', '/tmp', 'gid', '167' );
'/software/components/accounts/groups/ceph' = dict('gid', '167');

'/software/components/accounts/users/ceph' = dict(
'homeDir', '/tmp',
'gid', '167',
);
'/software/components/accounts/groups/ceph' = dict(
'gid', '167',
);
Loading