-
Notifications
You must be signed in to change notification settings - Fork 134
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
variable for sleep seconds using systemd environment. #102
base: master
Are you sure you want to change the base?
variable for sleep seconds using systemd environment. #102
Conversation
@SaravanaStorageNetwork LGTM. Waiting for one more lgtm before merging :) |
@@ -4,7 +4,8 @@ After=glusterd.service | |||
|
|||
[Service] | |||
Type=simple | |||
ExecStart=/usr/local/bin/check_diskspace.sh | |||
Environment="SLEEP_SECS=120" |
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.
May be POLL_INTERVAL
or simliar is better than SLEEP seconds. @SaravanaStorageNetwork
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.
Done
Signed-off-by: Saravanakumar Arumugam <[email protected]>
12d3883
to
63a0e67
Compare
This doesn't seem to solve the problem at all. Best I can tell from the |
I agree with everything @jarrpa said in his previous comment. |
I just remembered to add here: Also the sleep should probably happen at the end of the loop. Unless there's a reason we want to wait before checking if the disk space is full. |
Oops - I have missed the comment related to PassEnvironment by @phlogistonjohn - will check this out and update.
Reason to have the early wait is for glusterd to be up and running. Glusterd takes time to start(especially if too many volumes configured) and hence the wait immediate after glusterd start and then doing the check.. |
Signed-off-by: Saravanakumar Arumugam <[email protected]>
I don't understand why we're waiting for glusterd. We're just checking disk space, what purpose does waiting for glusterd serve? |
Running out of space is ( very )worst case scenario , not required to be checked even before glusterd getting settled. glusterd daemon may need to connect to other peers and it may update content inside /var/lib/glusterd. This is just to give some room for glusterd daemon. |
It's not REQUIRED, okay, but is there an actual technical reason as to why you SHOULD or MUST wait? I still see no relation between glusterd being ready and checking for disk space, and thus no reason to wait. Regardless, if no one else cares I'll just leave it there. The more important point is the PassEnvironment directive. |
Signed-off-by: Saravanakumar Arumugam <[email protected]>
@phlogistonjohn @humblec PTAL |
+1 on PassEnvironment As @obnoxxx mentioned in a different context we may want to do something about some of the duplication between the this internal server and the external facing probe script, but we can tackle that separately. |
Signed-off-by: Saravanakumar Arumugam [email protected]