// runStart handles the executes the flow of "minikube start"
4260
func runStart(cmd *cobra.Command, args []string) {
	console.OutStyle("happy", "minikube %s on %s (%s)", version.GetVersion(), runtime.GOOS, runtime.GOARCH)
	validateConfig()

	oldConfig, err := cfg.Load()
	if err != nil && !os.IsNotExist(err) {
		exit.WithCode(exit.Data, "Unable to load config: %v", err)
	}
	k8sVersion, isUpgrade := validateKubernetesVersions(oldConfig)
	config, err := generateConfig(cmd, k8sVersion)
	if err != nil {
		exit.WithError("Failed to generate config", err)
	}

	// For non-"none", the ISO is required to boot, so block until it is downloaded
	if viper.GetString(vmDriver) != constants.DriverNone {
		if err := cluster.CacheISO(config.MachineConfig); err != nil {
			exit.WithError("Failed to cache ISO", err)
		}
	} else {
		// With "none", images are persistently stored in Docker, so internal caching isn't necessary.
		viper.Set(cacheImages, false)
	}

	// Now that the ISO is downloaded, pull images in the background while the VM boots.
	var cacheGroup errgroup.Group
	beginCacheImages(&cacheGroup, k8sVersion)

	// Abstraction leakage alert: startHost requires the config to be saved, to satistfy pkg/provision/buildroot.
	// Hence, saveConfig must be called before startHost, and again afterwards when we know the IP.
	if err := saveConfig(config); err != nil {
		exit.WithError("Failed to save config", err)
	}

	m, err := machine.NewAPIClient()
	if err != nil {
		exit.WithError("Failed to get machine client", err)
	}

	// If --download-only, complete the remaining downloads and exit.
	if viper.GetBool(downloadOnly) {
		if err := doCacheBinaries(k8sVersion); err != nil {
			exit.WithError("Failed to cache binaries", err)
		}
		waitCacheImages(&cacheGroup)
		if err := CacheImagesInConfigFile(); err != nil {
			exit.WithError("Failed to cache images", err)
		}
		console.OutStyle("check", "Download complete!")
		return
	}

	host, preexisting := startHost(m, config.MachineConfig)

	ip := validateNetwork(host)
	// Save IP to configuration file for subsequent use
	config.KubernetesConfig.NodeIP = ip
	if err := saveConfig(config); err != nil {
		exit.WithError("Failed to save config", err)
	}
	runner, err := machine.CommandRunner(host)
	if err != nil {
		exit.WithError("Failed to get command runner", err)
	}

	cr := configureRuntimes(host, runner)

	// prepareHostEnvironment uses the downloaded images, so we need to wait for background task completion.
	waitCacheImages(&cacheGroup)

	bs := prepareHostEnvironment(m, config.KubernetesConfig)

	// The kube config must be update must come before bootstrapping, otherwise health checks may use a stale IP
	kubeconfig := updateKubeConfig(host, &config)
	bootstrapCluster(bs, cr, runner, config.KubernetesConfig, preexisting, isUpgrade)

	apiserverPort := config.KubernetesConfig.NodePort
	validateCluster(bs, cr, runner, ip, apiserverPort)
	configureMounts()
	if err = LoadCachedImagesInConfigFile(); err != nil {
		console.Failure("Unable to load cached images from config file.")
	}

	if config.MachineConfig.VMDriver == constants.DriverNone {
		console.OutStyle("starting-none", "Configuring local host environment ...")
		prepareNone()
	}

	showKubectlConnectInfo(kubeconfig)
	console.OutStyle("ready", "Done! Thank you for using minikube!")
}
141905
func (s *Service) Start() error {
	logger.Infof("Starting service %q", s.Service.Name)
	running, err := s.Running()
	if err != nil {
		return errors.Trace(err)
	}
	if running {
		logger.Infof("Service %q already running", s.Service.Name)
		return nil
	}
	err = s.manager.Start(s.Name())
	return err
}
776372
func RunWait(ctx context.Context, client *docker.Client, container *docker.Container) (errors chan error, err error) {
	err = provision.FnStart(client, container.ID)
	if err != nil {
		return
	}
	errors = provision.FnWaitContainer(client, container.ID)
	return
}
530022
func (s *SearchInput) SetStart(v int64) *SearchInput {
	s.Start = &v
	return s
}
719592
func (s *Service) Start() error {
	err := s.start()
	if errors.IsAlreadyExists(err) {
		logger.Debugf("service %q already running", s.Name())
		return nil
	} else if err != nil {
		logger.Errorf("service %q failed to start: %v", s.Name(), err)
		return err
	}
	logger.Debugf("service %q successfully started", s.Name())
	return nil
}
598720
func (l Logger) logStart(format string, a ...interface{}) {
	l.Info(fmt.Sprintf("[started]  %s", format), a...)
}
604355
func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error {
	// raw only makes sense for a single file resource multiple objects aren't likely to do what you want.
	// the validator enforces this, so
	if len(o.Raw) > 0 {
		return o.raw(f)
	}

	if o.EditBeforeCreate {
		return RunEditOnCreate(f, o.PrintFlags, o.RecordFlags, o.IOStreams, cmd, &o.FilenameOptions)
	}
	schema, err := f.Validator(cmdutil.GetFlagBool(cmd, "validate"))
	if err != nil {
		return err
	}

	cmdNamespace, enforceNamespace, err := f.ToRawKubeConfigLoader().Namespace()
	if err != nil {
		return err
	}

	r := f.NewBuilder().
		Unstructured().
		Schema(schema).
		ContinueOnError().
		NamespaceParam(cmdNamespace).DefaultNamespace().
		FilenameParam(enforceNamespace, &o.FilenameOptions).
		LabelSelectorParam(o.Selector).
		Flatten().
		Do()
	err = r.Err()
	if err != nil {
		return err
	}

	count := 0
	err = r.Visit(func(info *resource.Info, err error) error {
		if err != nil {
			return err
		}
		if err := kubectl.CreateOrUpdateAnnotation(cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag), info.Object, scheme.DefaultJSONEncoder()); err != nil {
			return cmdutil.AddSourceToErr("creating", info.Source, err)
		}

		if err := o.Recorder.Record(info.Object); err != nil {
			klog.V(4).Infof("error recording current command: %v", err)
		}

		if !o.DryRun {
			if err := createAndRefresh(info); err != nil {
				return cmdutil.AddSourceToErr("creating", info.Source, err)
			}
		}

		count++

		return o.PrintObj(info.Object)
	})
	if err != nil {
		return err
	}
	if count == 0 {
		return fmt.Errorf("no objects passed to create")
	}
	return nil
}
45268
func (c *ReportingClient) RunStarted(ctx context.Context, args RunStartedArgs) error {
	return c.postJSON("runstarted", args)
}
317266
func (s *DateFilter) SetStart(v string) *DateFilter {
	s.Start = &v
	return s
}
648284
func (c *APIClient) RTMStart() (*RTMStartResult, error) {
	var result RTMStartResult
	resp, err := c.slackMethod("rtm.start")
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if err := ParseResponse(resp.Body, &result); err != nil {
		return nil, err
	}

	return &result, nil
}
204590
func runStartContainerErr(err error) error {
	trimmedErr := strings.TrimPrefix(err.Error(), "Error response from daemon: ")
	statusError := cli.StatusError{StatusCode: 125}
	if strings.Contains(trimmedErr, "executable file not found") ||
		strings.Contains(trimmedErr, "no such file or directory") ||
		strings.Contains(trimmedErr, "system cannot find the file specified") {
		statusError = cli.StatusError{StatusCode: 127}
	} else if strings.Contains(trimmedErr, syscall.EACCES.Error()) {
		statusError = cli.StatusError{StatusCode: 126}
	}

	return statusError
}
276000
func (s *Reservation) SetStart(v string) *Reservation {
	s.Start = &v
	return s
}
975172
func (s *PurchaseOfferingInput) SetStart(v string) *PurchaseOfferingInput {
	s.Start = &v
	return s
}
1015938
func (prg *Program) Start(srv service.Service) error {
	os.Exit(0)
	return nil
}
647890
func (s *TimeRange) SetStart(v time.Time) *TimeRange {
	s.Start = &v
	return s
}
473944
func (m *podManager) Start(rundir string, localSubnetCIDR string, clusterNetworks []common.ClusterNetwork, serviceNetworkCIDR string, clearHostPorts bool) error {
	if m.enableHostports {
		iptInterface := utiliptables.New(utilexec.New(), utildbus.New(), utiliptables.ProtocolIpv4)
		m.hostportSyncer = kubehostport.NewHostportSyncer(iptInterface)
		if clearHostPorts {
			_ = m.hostportSyncer.SyncHostports(Tun0, nil)
		}
	}

	var err error
	if m.ipamConfig, err = getIPAMConfig(clusterNetworks, localSubnetCIDR); err != nil {
		return err
	}

	go m.processCNIRequests()

	m.cniServer = cniserver.NewCNIServer(rundir, &cniserver.Config{MTU: m.mtu, ServiceNetworkCIDR: serviceNetworkCIDR})
	return m.cniServer.Start(m.handleCNIRequest)
}
886469
func (s *Server) OnStart() error {
	go s.loop(state{
		queries: make(map[query.Query]map[string]chan interface{}),
		clients: make(map[string]map[query.Query]struct{}),
	})
	return nil
}