Default to --native = true

This commit temporarily sets the default value for --native to true,
making running inside a container an opt-in behavior. This will make the
testing and transition to containerized mixer easier. Eventually this
switch will be flipped back to false, making containerized the default
running mode.

To run in container, append '--native=false' to your command.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
This commit is contained in:
Kevin C. Wells
2018-06-07 17:13:47 -07:00
committed by tmarcu
parent effd61323d
commit ac22c9c95a
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ const Version = "4.6.1"
// Native controls whether mixer runs the command on the native machine or in a
// container.
var Native = false
var Native = true
// Offline controls whether mixer attempts to automatically cache upstream
// bundles. In offline mode, all necessary bundles must exist in local-bundles.
+4 -1
View File
@@ -204,7 +204,7 @@ func init() {
// TODO: Remove this once we drop the old config format
RootCmd.PersistentFlags().BoolVar(&config.UseNewConfig, "new-config", false, "EXPERIMENTAL: use the new TOML config format")
RootCmd.PersistentFlags().BoolVar(&builder.Native, "native", false, "Run mixer command on native host instead of in a container")
RootCmd.PersistentFlags().BoolVar(&builder.Native, "native", true, "Run mixer command on native host instead of in a container")
RootCmd.PersistentFlags().BoolVar(&builder.Offline, "offline", false, "Skip caching upstream-bundles; work entirely with local-bundles")
RootCmd.AddCommand(initCmd)
@@ -247,6 +247,9 @@ func reconstructCommand(cmd *cobra.Command, args []string) []string {
}
// For each flag that was set, append its name and value
cmd.Flags().Visit(func(flag *pflag.Flag) {
if flag.Name == "native" {
return
}
command = append(command, "--"+flag.Name+"="+flag.Value.String())
})
// Append args