Skip to content
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

Keep admin script in sync with init script #143

Merged
merged 1 commit into from Dec 17, 2020

Conversation

ellert
Copy link
Member

@ellert ellert commented Dec 17, 2020

Even though there is a comment in the admin script that says:

Keep in sync with init script

the admin script is not in sync with the init script.
This commit corrects this.

The admin script ignored the GLOBUS_SEG_PIDFMT setting in the
sysconfig file that the init script uses. With the default value they
still did the same, and there is usually no need to change the
default, so it usually worked anyway.

Even though there is a comment in the admin script that says:
  # Keep in sync with init script
the admin script is not in sync with the init script.
This commit corrects this.

The admin script ignored the GLOBUS_SEG_PIDFMT setting in the
sysconfig file that the init script uses. With the default value they
still did the same, and there is usually no need to change the
default, so it usually worked anyway.
@matyasselmeci
Copy link
Contributor

Doesn't this now ignore GLOBUS_SEG_PIDDIR? Is that set anywhere?

@ellert
Copy link
Member Author

ellert commented Dec 17, 2020

Doesn't this now ignore GLOBUS_SEG_PIDDIR? Is that set anywhere?

This is the only place GLOBUS_SEG_PIDDIR is mentioned in the entire source tree.
It is not set in the default version of the sysconfig file, which does set GLOBUS_SEG_PIDFMT.

GLOBUS_SEG_PIDFMT="${localstatedir}/run/globus-scheduler-event-generator-%s.pid"

It is possible to set GLOBUS_SEG_PIDDIR by adding it to the sysconfig file. However, if that is done this setting is ignored by the init script which only supports GLOBUS_SEG_PIDFMT.
GLOBUS_SEG_PIDFMT="${GLOBUS_SEG_PIDFMT:-${localstatedir}/run/globus-scheduler-event-generator-%s.pid}"

Similarly, changing the default values of GLOBUS_SEG_PIDFMT specified in the sysconfig file will cause a change in where the init script says that the pid file is, but will be ignored by the admin script.
With this proposed change, both the init script and the admin script will recognise the GLOBUS_SEG_PIDFMT variable, which is the one that is mentioned in the default sysconfig file. (And both will ignore GLOBUS_SEG_PIDDIR.)

@matyasselmeci
Copy link
Contributor

OK, looks good.

@matyasselmeci matyasselmeci merged commit 061e2d8 into gridcf:master Dec 17, 2020
@ellert ellert deleted the keep-in-sync branch December 17, 2020 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants