Skip to contentSkip to conversation

config: Enable hosttags by default

PATCH New Thomas Bechtold 1 participant 2 messages Oct 10, 2017 – Oct 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: Enable hosttags by default

From: Thomas Bechtold <[email protected]>

There is currently no way to modify the lvm configuration on a specific host without modifiying lvm.conf first due to the current default config.
This is bad for configuration management systems (Chef, Salt, Ansible, ...) because changing the lvm configuration needs to modify lvm.conf which overrides the distro default config then with a template provided by the config-mgmt-system.
Enabling hosttags improves the situation because config-mgmt-systems can simply drop a file in /etc/lvm/lvm_$(uname -n).conf without modifying /etc/lvm/lvm.conf first.

---
 conf/example.conf.in       | 2 +-
 lib/commands/toolcontext.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
conf/example.conf.in +1 -1
index b5b0e6af1..4dc89b51c 100644
@@ -2092,7 +2092,7 @@ dmeventd {
 	# Create a host tag using the machine name.
 	# The machine name is nodename returned by uname(2).
 	# This configuration option has an automatic default value.
-	# hosttags = 0
+	# hosttags = 1
 
 	# Configuration section tags/<tag>.
 	# Replace this subsection name with a custom tag name.
lib/commands/toolcontext.c +2 -2
index 39b300a78..09c75862b 100644
@@ -1863,7 +1863,7 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
 	cmd->handles_unknown_segments = 0;
 	cmd->independent_metadata_areas = 0;
 	cmd->ignore_clustered_vgs = 0;
-	cmd->hosttags = 0;
+	cmd->hosttags = 1;
 	dm_list_init(&cmd->arg_value_groups);
 	dm_list_init(&cmd->formats);
 	dm_list_init(&cmd->segtypes);
@@ -2137,7 +2137,7 @@ int refresh_toolcontext(struct cmd_context *cmd)
 
 	cmd->initialized.config = 0;
 
-	cmd->hosttags = 0;
+	cmd->hosttags = 1;
 
 	cmd->lib_dir = NULL;
 
Signature · 1 line
2.14.2
#1 lore raw

PATCH 1/1 config: Enable hosttags by default

Hi,

I filled now https://bugzilla.redhat.com/show_bug.cgi?id=1501712 for this problem/feature request.

Quoted 62 lines

Thomas Bechtold <[email protected]> hat am 10. Oktober 2017 um 10:42 geschrieben:

From: Thomas Bechtold <[email protected]>

There is currently no way to modify the lvm configuration on a specific host without modifiying lvm.conf first due to the current default config.
This is bad for configuration management systems (Chef, Salt, Ansible, ...) because changing the lvm configuration needs to modify lvm.conf which overrides the distro default config then with a template provided by the config-mgmt-system.
Enabling hosttags improves the situation because config-mgmt-systems can simply drop a file in /etc/lvm/lvm_$(uname -n).conf without modifying /etc/lvm/lvm.conf first.

---
 conf/example.conf.in       | 2 +-
 lib/commands/toolcontext.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
conf/example.conf.in +1 -1
index b5b0e6af1..4dc89b51c 100644
@@ -2092,7 +2092,7 @@ dmeventd {
 	# Create a host tag using the machine name.
 	# The machine name is nodename returned by uname(2).
 	# This configuration option has an automatic default value.
-	# hosttags = 0
+	# hosttags = 1
 
 	# Configuration section tags/<tag>.
 	# Replace this subsection name with a custom tag name.
lib/commands/toolcontext.c +2 -2
index 39b300a78..09c75862b 100644
@@ -1863,7 +1863,7 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
 	cmd->handles_unknown_segments = 0;
 	cmd->independent_metadata_areas = 0;
 	cmd->ignore_clustered_vgs = 0;
-	cmd->hosttags = 0;
+	cmd->hosttags = 1;
 	dm_list_init(&cmd->arg_value_groups);
 	dm_list_init(&cmd->formats);
 	dm_list_init(&cmd->segtypes);
@@ -2137,7 +2137,7 @@ int refresh_toolcontext(struct cmd_context *cmd)
 
 	cmd->initialized.config = 0;
 
-	cmd->hosttags = 0;
+	cmd->hosttags = 1;
 
 	cmd->lib_dir = NULL;
 
Signature · 6 lines
2.14.2

--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel