Revision 75f2ff7d
b/lib/client/gnt_cluster.py | ||
---|---|---|
974 | 974 |
opts.ipolicy_std_specs is not None or |
975 | 975 |
opts.ipolicy_disk_templates is not None or |
976 | 976 |
opts.ipolicy_vcpu_ratio is not None or |
977 |
opts.ipolicy_spindle_ratio is not None): |
|
977 |
opts.ipolicy_spindle_ratio is not None or |
|
978 |
opts.modify_etc_hosts is not None): |
|
978 | 979 |
ToStderr("Please give at least one of the parameters.") |
979 | 980 |
return 1 |
980 | 981 |
|
... | ... | |
1079 | 1080 |
ipolicy=ipolicy, |
1080 | 1081 |
candidate_pool_size=opts.candidate_pool_size, |
1081 | 1082 |
maintain_node_health=mnh, |
1083 |
modify_etc_hosts=opts.modify_etc_hosts, |
|
1082 | 1084 |
uid_pool=uid_pool, |
1083 | 1085 |
add_uids=add_uids, |
1084 | 1086 |
remove_uids=remove_uids, |
... | ... | |
1597 | 1599 |
RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT, |
1598 | 1600 |
NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT, |
1599 | 1601 |
DISK_STATE_OPT, SUBMIT_OPT, ENABLED_DISK_TEMPLATES_OPT, |
1600 |
IPOLICY_STD_SPECS_OPT] + INSTANCE_POLICY_OPTS, |
|
1602 |
IPOLICY_STD_SPECS_OPT, MODIFY_ETCHOSTS_OPT] + INSTANCE_POLICY_OPTS,
|
|
1601 | 1603 |
"[opts...]", |
1602 | 1604 |
"Alters the parameters of the cluster"), |
1603 | 1605 |
"renew-crypto": ( |
b/lib/cmdlib/cluster.py | ||
---|---|---|
971 | 971 |
" maintenance is not useful (still enabling it)") |
972 | 972 |
self.cluster.maintain_node_health = self.op.maintain_node_health |
973 | 973 |
|
974 |
if self.op.modify_etc_hosts is not None: |
|
975 |
self.cluster.modify_etc_hosts = self.op.modify_etc_hosts |
|
976 |
|
|
974 | 977 |
if self.op.prealloc_wipe_disks is not None: |
975 | 978 |
self.cluster.prealloc_wipe_disks = self.op.prealloc_wipe_disks |
976 | 979 |
|
b/lib/opcodes.py | ||
---|---|---|
979 | 979 |
ht.TMaybe(ht.TAnd(ht.TListOf(ht.TElemOf(constants.DISK_TEMPLATES)), |
980 | 980 |
ht.TTrue)), |
981 | 981 |
"List of enabled disk templates"), |
982 |
("modify_etc_hosts", None, ht.TMaybeBool, |
|
983 |
"Whether the cluster can modify and keep in sync the /etc/hosts files"), |
|
982 | 984 |
] |
983 | 985 |
OP_RESULT = ht.TNone |
984 | 986 |
|
b/src/Ganeti/OpCodes.hs | ||
---|---|---|
177 | 177 |
, pBlacklistedOs |
178 | 178 |
, pUseExternalMipScript |
179 | 179 |
, pEnabledDiskTemplates |
180 |
, pModifyEtcHosts |
|
180 | 181 |
]) |
181 | 182 |
, ("OpClusterRedistConf", []) |
182 | 183 |
, ("OpClusterActivateMasterIp", []) |
b/src/Ganeti/OpParams.hs | ||
---|---|---|
116 | 116 |
, pAddUids |
117 | 117 |
, pRemoveUids |
118 | 118 |
, pMaintainNodeHealth |
119 |
, pModifyEtcHosts |
|
119 | 120 |
, pPreallocWipeDisks |
120 | 121 |
, pNicParams |
121 | 122 |
, pInstNics |
... | ... | |
865 | 866 |
pMaintainNodeHealth :: Field |
866 | 867 |
pMaintainNodeHealth = optionalField $ booleanField "maintain_node_health" |
867 | 868 |
|
869 |
-- | Whether to modify and keep in sync the @/etc/hosts@ files of nodes. |
|
870 |
pModifyEtcHosts :: Field |
|
871 |
pModifyEtcHosts = optionalField $ booleanField "modify_etc_hosts" |
|
872 |
|
|
868 | 873 |
-- | Whether to wipe disks before allocating them to instances. |
869 | 874 |
pPreallocWipeDisks :: Field |
870 | 875 |
pPreallocWipeDisks = optionalField $ booleanField "prealloc_wipe_disks" |
b/test/hs/Test/Ganeti/OpCodes.hs | ||
---|---|---|
161 | 161 |
arbitrary <*> arbitrary <*> arbitrary <*> |
162 | 162 |
emptyMUD <*> emptyMUD <*> arbitrary <*> |
163 | 163 |
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> |
164 |
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary |
|
164 |
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
|
165 | 165 |
"OP_CLUSTER_REDIST_CONF" -> pure OpCodes.OpClusterRedistConf |
166 | 166 |
"OP_CLUSTER_ACTIVATE_MASTER_IP" -> |
167 | 167 |
pure OpCodes.OpClusterActivateMasterIp |
Also available in: Unified diff