All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] config: Enable hosttags by default
@ 2017-10-10  8:42 Thomas Bechtold
  2017-10-13  5:25 ` thomasbechtold
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bechtold @ 2017-10-10  8:42 UTC (permalink / raw
  To: lvm-devel

From: Thomas Bechtold <tbechtold@suse.com>

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(-)

diff --git a/conf/example.conf.in b/conf/example.conf.in
index b5b0e6af1..4dc89b51c 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -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.
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 39b300a78..09c75862b 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -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;
 
-- 
2.14.2



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

* [PATCH] config: Enable hosttags by default
  2017-10-10  8:42 [PATCH] config: Enable hosttags by default Thomas Bechtold
@ 2017-10-13  5:25 ` thomasbechtold
  0 siblings, 0 replies; 2+ messages in thread
From: thomasbechtold @ 2017-10-13  5:25 UTC (permalink / raw
  To: lvm-devel

Hi,

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

> Thomas Bechtold <thomasbechtold@jpberlin.de> hat am 10. Oktober 2017 um 10:42 geschrieben:
> 
> 
> From: Thomas Bechtold <tbechtold@suse.com>
> 
> 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(-)
> 
> diff --git a/conf/example.conf.in b/conf/example.conf.in
> index b5b0e6af1..4dc89b51c 100644
> --- a/conf/example.conf.in
> +++ b/conf/example.conf.in
> @@ -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.
> diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
> index 39b300a78..09c75862b 100644
> --- a/lib/commands/toolcontext.c
> +++ b/lib/commands/toolcontext.c
> @@ -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;
>  
> -- 
> 2.14.2
> 
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel



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

end of thread, other threads:[~2017-10-13  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10  8:42 [PATCH] config: Enable hosttags by default Thomas Bechtold
2017-10-13  5:25 ` thomasbechtold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.