Merge pull request #1066 from owncloud/runtime-cleanup
This commit is contained in:
@@ -97,7 +97,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Enhancement: Runtime Cleanup
|
||||||
|
|
||||||
|
Small runtime cleanup prior to Tech Preview release
|
||||||
|
|
||||||
|
https://github.com/owncloud/ocis/pull/1066
|
||||||
@@ -86,7 +86,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ var (
|
|||||||
// Extensions are ocis extension services
|
// Extensions are ocis extension services
|
||||||
Extensions = []string{
|
Extensions = []string{
|
||||||
"glauth",
|
"glauth",
|
||||||
"graph",
|
|
||||||
"graph-explorer",
|
|
||||||
"konnectd",
|
"konnectd",
|
||||||
"ocs",
|
"ocs",
|
||||||
"onlyoffice",
|
"onlyoffice",
|
||||||
@@ -54,6 +52,8 @@ var (
|
|||||||
"storage-public-link",
|
"storage-public-link",
|
||||||
"thumbnails",
|
"thumbnails",
|
||||||
"webdav",
|
"webdav",
|
||||||
|
//"graph",
|
||||||
|
//"graph-explorer",
|
||||||
}
|
}
|
||||||
|
|
||||||
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
||||||
@@ -129,6 +129,11 @@ OUT:
|
|||||||
func RunService(client *rpc.Client, service string) int {
|
func RunService(client *rpc.Client, service string) int {
|
||||||
args := process.NewProcEntry(service, os.Environ(), []string{service}...)
|
args := process.NewProcEntry(service, os.Environ(), []string{service}...)
|
||||||
|
|
||||||
|
all := append(Extensions, append(dependants, MicroServices...)...)
|
||||||
|
if !contains(all, service) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
var reply int
|
var reply int
|
||||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||||
golog.Fatal(err)
|
golog.Fatal(err)
|
||||||
@@ -159,3 +164,12 @@ func setDefaults() {
|
|||||||
// registry
|
// registry
|
||||||
registry.Name = OwncloudNamespace + "registry"
|
registry.Name = OwncloudNamespace + "registry"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func contains(a []string, b string) bool {
|
||||||
|
for i := range a {
|
||||||
|
if a[i] == b {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ func Execute() error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
|||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case viper.ConfigFileNotFoundError:
|
case viper.ConfigFileNotFoundError:
|
||||||
logger.Info().
|
logger.Debug().
|
||||||
Msg("no config found on preconfigured location")
|
Msg("no config found on preconfigured location")
|
||||||
case viper.UnsupportedConfigError:
|
case viper.UnsupportedConfigError:
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
|
|||||||
Reference in New Issue
Block a user