[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] expert_mode: Add a new configuration option for expert users.



On Fri, 2013-07-12 at 14:08 -0400, Konrad Rzeszutek Wilk wrote:
> This could also be called 'seatbelt' option.
> 
> libxl has a variety of checks where it will fail out an operation
> unless the user has provided an --force (or --ignore) parameter.
> Currently one such check is for the 'vcpu-set' command which
> will error out if the count of virtual cpus is greater than the
> physical cpus. This parameter will ignore such checks and allow
> the user to do the operations without the need for override flags.

Does this overlap  somewhat with various commands which individually
take a -f(orce) option?

> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
>  docs/man/xl.conf.pod.5   |   24 ++++++++++++++++++++++++
>  tools/examples/xl.conf   |    6 ++++++
>  tools/libxl/xl.c         |    4 ++++
>  tools/libxl/xl.h         |    1 +
>  tools/libxl/xl_cmdimpl.c |    6 ++++++
>  5 files changed, 41 insertions(+), 0 deletions(-)
> 
> diff --git a/docs/man/xl.conf.pod.5 b/docs/man/xl.conf.pod.5
> index 125f786..ed67472 100644
> --- a/docs/man/xl.conf.pod.5
> +++ b/docs/man/xl.conf.pod.5
> @@ -158,6 +158,30 @@ massively huge guests).
>  
>  =back
>  
> +=item B<expert_mode=BOOLEAN>
> +
> +Do not act on host performed checks that might lead to performance
> +degradations. Currently checks are made for following operations:
> + - C<vcpu-set> - if the number of VCPUs set for a guest is higher than the
> +   physical count the operation will error out.
> +
> +
> +Default: C<1>
> +
> +=over 4
> +
> +=item C<0>
> +
> +The checks are active and the operation will fail if the checks
> +are triggered.
> +
> +=item C<1>
> +
> +The checks are active but will be ignored and the operations
> +will commence.
> +
> +=back
> +
>  =back
>  
>  =head1 SEE ALSO
> diff --git a/tools/examples/xl.conf b/tools/examples/xl.conf
> index a80b8e7..6f27d67 100644
> --- a/tools/examples/xl.conf
> +++ b/tools/examples/xl.conf
> @@ -33,3 +33,9 @@
>  # (which can take a long time to find out if launching huge guests).
>  # see xl.conf(5) for details.
>  claim_mode=1
> +
> +# The user knows what to do. Currently enabling this option will mean that:
> +#  vcpu-set won't check the physical CPU count - which means the guest can
> +#           over-subscribe (more vCPUS than pCPUS).
> +# see xl.conf(5) for details.
> +expert_mode=1
> diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
> index 1ce820c..4063b7c 100644
> --- a/tools/libxl/xl.c
> +++ b/tools/libxl/xl.c
> @@ -47,6 +47,7 @@ char *default_bridge = NULL;
>  char *default_gatewaydev = NULL;
>  enum output_format default_output_format = OUTPUT_FORMAT_JSON;
>  int claim_mode = 0;
> +int expert_mode = 0;
>  
>  static xentoollog_level minmsglevel = XTL_PROGRESS;
>  
> @@ -173,6 +174,9 @@ static void parse_global_config(const char *configfile,
>      if (!xlu_cfg_get_long (config, "claim_mode", &l, 0))
>          claim_mode = l;
>  
> +    if (!xlu_cfg_get_long (config, "expert_mode", &l, 0))
> +        expert_mode = l;
> +
>      xlu_cfg_destroy(config);
>  }
>  
> diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h
> index 5ad3e17..51b7008 100644
> --- a/tools/libxl/xl.h
> +++ b/tools/libxl/xl.h
> @@ -147,6 +147,7 @@ extern int autoballoon;
>  extern int run_hotplug_scripts;
>  extern int dryrun_only;
>  extern int claim_mode;
> +extern int expert_mode;
>  extern char *lockfile;
>  extern char *default_vifscript;
>  extern char *default_bridge;
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 8a478ba..a55c66a 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -4560,6 +4560,12 @@ int main_vcpuset(int argc, char **argv)
>          break;
>      }
>  
> +    /*
> +     * No seatbelts for the user.
> +     */
> +    if (expert_mode)
> +        check_host = 0;
> +
>      vcpuset(find_domain(argv[optind]), argv[optind + 1], check_host);
>      return 0;
>  }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.