func (t *operations) Setup(sink tether.Config) error { if err := t.BaseOperations.Setup(sink); err != nil { return err } return pprof.StartPprof("vch-init", pprof.VCHInitPort) }
func init() { defer trace.End(trace.Begin("")) trace.Logger.Level = log.DebugLevel _ = pprof.StartPprof("vicadmin", pprof.VicadminPort) // We don't want to run this as root. ud := syscall.Getuid() gd := syscall.Getgid() log.Info(fmt.Sprintf("Current UID/GID = %d/%d", ud, gd)) // TODO: Enable this after we figure out to NOT break the test suite with it. // if ud == 0 { // log.Errorf("Error: vicadmin must not run as root.") // time.Sleep(60 * time.Second) // os.Exit(1) // } flag.StringVar(&rootConfig.addr, "l", "client.localhost:2378", "Listen address") // TODO: This should all be pulled from the config flag.StringVar(&rootConfig.DatacenterPath, "dc", "", "Path of the datacenter") flag.StringVar(&rootConfig.ClusterPath, "cluster", "", "Path of the cluster") flag.StringVar(&rootConfig.PoolPath, "pool", "", "Path of the resource pool") // load the vch config src, err := extraconfig.GuestInfoSource() if err != nil { log.Errorf("Unable to load configuration from guestinfo") return } extraconfig.Decode(src, &vchConfig) // FIXME: pull the rest from flags flag.Parse() }
func init() { defer trace.End(trace.Begin("")) trace.Logger.Level = log.DebugLevel _ = pprof.StartPprof("vicadmin", pprof.VicadminPort) // We don't want to run this as root. ud := syscall.Getuid() gd := syscall.Getgid() log.Info(fmt.Sprintf("Current UID/GID = %d/%d", ud, gd)) // TODO: Enable this after we figure out to NOT break the test suite with it. // if ud == 0 { // log.Errorf("Error: vicadmin must not run as root.") // time.Sleep(60 * time.Second) // os.Exit(1) // } flag.StringVar(&config.addr, "l", ":2378", "Listen address") flag.StringVar(&config.dockerHost, "docker-host", "127.0.0.1:2376", "Docker host") flag.StringVar(&config.hostCertFile, "hostcert", "", "Host certificate file") flag.StringVar(&config.hostKeyFile, "hostkey", "", "Host private key file") flag.StringVar(&config.DatacenterPath, "dc", "", "Name of the Datacenter") flag.StringVar(&config.DatastorePath, "ds", "", "Name of the Datastore") flag.StringVar(&config.ClusterPath, "cluster", "", "Path of the cluster") flag.StringVar(&config.PoolPath, "pool", "", "Path of the resource pool") flag.BoolVar(&config.Insecure, "insecure", false, "Allow connection when sdk certificate cannot be verified") flag.BoolVar(&config.tls, "tls", true, "Set to false to disable -hostcert and -hostkey and enable plain HTTP") // This is only applicable for containers hosted under the VCH VM folder // This will not function for vSAN flag.StringVar(&config.vmPath, "vm-path", "", "Docker vm path") flag.Parse() // load the vch config src, err := extraconfig.GuestInfoSource() if err != nil { log.Errorf("Unable to load configuration from guestinfo") return } extraconfig.Decode(src, &vchConfig) }
func init() { trace.Logger.Level = log.DebugLevel pprof.StartPprof("docker personality", pprof.DockerPort) }
func init() { pprof.StartPprof("portlayer server", pprof.PortlayerPort) }