# New scheduler service name conf variable

**URL:** <https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649>\
**Category:** Developers\
**Created:** [June 12, 2019, 10:10pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649 "2019-06-12T22:10:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisa-altair](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/lisa-altair/32/643_2.png) [@lisa-altair](https://community.openpbs.org/u/lisa-altair)\
**Post date:** [June 12, 2019, 10:10pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/1 "2019-06-12T22:10:32Z")

</div>

Introducing a new conf variable for the scheduler name.

Take a look at the proposal:  
[https://pbspro.atlassian.net/wiki/spaces/PD/pages/1318387715/New+scheduler+service+name+conf+variable](https://pbspro.atlassian.net/wiki/spaces/PD/pages/1318387715/New+scheduler+service+name+conf+variable)

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [June 12, 2019, 11:52pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/2 "2019-06-12T23:52:53Z")

</div>

I’m fine with PBS\_SCHEDULER\_HOST\_NAME, but please don’t use something with “SERVICE” in the name. It implies it has something to do with /etc/services.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [June 13, 2019, 9:11am UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/3 "2019-06-13T09:11:46Z")

</div>

Thanks for the proposal Lisa. Just trying to understand the motivation for this change: does the communication issue exist when server and scheduler are in different kubernetes pods, or is it when they are in the same pod?

---

<div class="post-metadata">

**Author:** ![lisa-altair](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/lisa-altair/32/643_2.png) [@lisa-altair](https://community.openpbs.org/u/lisa-altair)\
**Post date:** [June 14, 2019, 8:28pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/4 "2019-06-14T20:28:06Z")

</div>

Hi @agrawalravi90, the issue exists when the server and scheduler are within the same kubernetes pod. We are also setting the PBS\_LEAF\_NAME to the external-to-the-pod IP address, and the server uses the value of that variable to connect to the scheduler.

---

<div class="post-metadata">

**Author:** ![arungrover](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/arungrover/32/40_2.png) [@arungrover](https://community.openpbs.org/u/arungrover)\
**Post date:** [June 18, 2019, 8:46pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/5 "2019-06-18T20:46:37Z")

</div>

I like the change of adding a scheduler host name in general, but I also agree with Mike that it can go without “SERVICE” being mentioned in the name.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [June 19, 2019, 6:27am UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/6 "2019-06-19T06:27:12Z")

</div>

Thanks for explaining Lisa. I’m just wondering how this will work with multi-sched, where each sched will have its own port number and possibly its own unique hostname as well. Have you thought about this scenario?

---

<div class="post-metadata">

**Author:** ![vstumpf](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@vstumpf](https://community.openpbs.org/u/vstumpf)\
**Post date:** [June 19, 2019, 3:49pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/7 "2019-06-19T15:49:45Z")

</div>

This option is to point the server to the default hostname of the scheduler, and not the port. (the port already has an env var) The functionality is already there with the `-S` option to the server, but this RFE will add it to the conf file so admins can still use the init script.  
This shouldn’t affect any other features.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [June 19, 2019, 5:31pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/8 "2019-06-19T17:31:04Z")

</div>

Thanks for your reply @vstumpf.  
I wasn’t concerned about this affecting existing functionality, I was just thinking whether this solution will also work in a multi-sched scenario on kubernetes. So, say, if we have multiple schedulers & the server running inside a pod, will all schedulers be able to talk to the server without any issues? I don’t want us to have to change our approach later to support multi-scheds, so just making sure.

---

<div class="post-metadata">

**Author:** ![vstumpf](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@vstumpf](https://community.openpbs.org/u/vstumpf)\
**Post date:** [June 19, 2019, 9:41pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/9 "2019-06-19T21:41:40Z")

</div>

It should work. We need this to talk to the first scheduler. Any other schedulers will either use the same hostname and a different port or a different hostname, just like on a normal setup.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [June 20, 2019, 7:59am UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/10 "2019-06-20T07:59:08Z")

</div>

Alright, sounds good. Proposal looks fine to me.

---

<div class="post-metadata">

**Author:** ![lisa-altair](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/lisa-altair/32/643_2.png) [@lisa-altair](https://community.openpbs.org/u/lisa-altair)\
**Post date:** [July 17, 2019, 11:23pm UTC](https://community.openpbs.org/t/new-scheduler-service-name-conf-variable/1649/11 "2019-07-17T23:23:38Z")

</div>

After code got reviewed, we realized that perhaps a better method of setting the scheduler host name for the default scheduler would be to use qmgr. Especially since doing so would match what is done when using multiple schedulers.  
This discussion is closed.

Please post comments about the new design at the following forum discussion:

> [@Setting the scheduler host name that the server uses](http://community.openpbs.org/t/setting-the-scheduler-host-name-that-the-server-uses/1706):
>
> We realized that perhaps a better method of setting the scheduler host name for the default scheduler would be to use qmgr (instead of a configuration variable). Especially since doing so would match what is done when using multiple schedulers. Please take a look at the proposal: [https://pbspro.atlassian.net/wiki/spaces/PD/pages/1318387715/Setting+the+scheduler+host+name+that+the+server+uses](https://pbspro.atlassian.net/wiki/spaces/PD/pages/1318387715/Setting+the+scheduler+host+name+that+the+server+uses)
