containerd: revert the auto config creation

rather than automagically doing this, it is the user's responsibility to
review the output of `containerd config default` and create the config
themselves.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-04-10 14:33:38 -04:00
parent 741c471753
commit f58f047b7f
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -157,19 +157,7 @@ func before(context *cli.Context) error {
err := loadConfig(context.GlobalString("config")) err := loadConfig(context.GlobalString("config"))
if err != nil && !os.IsNotExist(err) { if err != nil && !os.IsNotExist(err) {
return err return err
} else if err != nil && os.IsNotExist(err) {
log.G(global).Infof("config %q does not exist. Creating it.", context.GlobalString("config"))
fh, err := os.Create(context.GlobalString("config"))
if err != nil {
return err
} }
if _, err := conf.WriteTo(fh); err != nil {
fh.Close()
return err
}
fh.Close()
}
// the order for config vs flag values is that flags will always override // the order for config vs flag values is that flags will always override
// the config values if they are set // the config values if they are set
if err := setLevel(context); err != nil { if err := setLevel(context); err != nil {