-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-1980: Changes for CloudScanner auto upgrade and cloud agent #2139
Conversation
[unix_http_server] | ||
file=/var/run/supervisor.sock | ||
chmod=0700 | ||
|
||
[supervisord] | ||
logfile=%(ENV_DF_INSTALL_DIR)s/var/log/supervisor/supervisord.log | ||
pidfile=/var/run/supervisord.pid | ||
childlogdir=%(ENV_DF_INSTALL_DIR)s/var/log/supervisor | ||
|
||
[supervisorctl] | ||
serverurl=unix:///var/run/supervisor.sock | ||
|
||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[program:deepfenced] | ||
environment=DF_ENABLE_CLOUD_NODE=true | ||
command=/bin/deepfenced | ||
numprocs=1 | ||
autostart=true | ||
autorestart=true | ||
startsecs=0 | ||
stopwaitsecs=30 | ||
killasgroup=true | ||
priority=50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we resue the same as agent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using the DF_INSTALL_DIR env variable for the cloud scanner agent which we are not using in the case of regular agent. This env is required to setup the directory structure (/home/deepfence) for the cloudscanner agent.
} | ||
} | ||
log.Info().Msgf("Started processes:%s", strings.Join(startedProcesses, ",")) | ||
log.Info().Msgf("Failed processes:%s", strings.Join(failedProcess, ",")) | ||
|
||
if enableClusterDiscovery { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit switch
instead?
@@ -87,6 +93,7 @@ func restartSelf() error { | |||
} | |||
argv0, err := exec.LookPath(os.Args[0]) | |||
if err != nil { | |||
log.Error().Msgf(err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Since we push the err
to next layer, not needed
fbc8585
to
79674ad
Compare
79674ad
to
2103fc6
Compare
Fixes #
https://github.com/deepfence/enterprise-roadmap/issues/1980
Changes proposed in this pull request: