# Interactive job disappearing when using two OODs

**URL:** <https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131>\
**Category:** Get Help\
**Created:** [September 25, 2020, 1:10pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131 "2020-09-25T13:10:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [September 25, 2020, 1:10pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/1 "2020-09-25T13:10:44Z")

</div>

Hello,

We have two OOD environments and both use the same shared home directory. I have noticed that existing interactive jobs were disappeared when I opened both OODs. I guess the problem is both are using the same /home/user/ondemand directory.

Is there a way to change the folder name?

Thank you

---

<div class="post-metadata">

**Author:** ![azric](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/azric/32/63_2.png) [@azric](https://discourse.openondemand.org/u/azric)\
**Post date:** [September 25, 2020, 1:24pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/2 "2020-09-25T13:24:03Z")

</div>

You can set the folder name in /etc/ood/config/nginx\_stage.yml

via

# Unique name of this OnDemand portal used to namespace multiple hosted portals

# NB: If this is not set then most apps will use default namespace “ondemand”

![image001.png](https://us1.discourse-cdn.com/flex015/uploads/osc/original/1X/bb1eada85d8dd4fdc766967a59ab5a24b8c637ce.png)

![image002.png](https://us1.discourse-cdn.com/flex015/uploads/osc/original/1X/38e726370bedb68e58a8b4dc092c24d2de0cd129.png)

---

<div class="post-metadata">

**Author:** ![alanc](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/alanc/32/2524_2.png) [@alanc](https://discourse.openondemand.org/u/alanc)\
**Post date:** [September 25, 2020, 1:26pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/3 "2020-09-25T13:26:11Z")

</div>

Just to clarify / document, I think what you are asking for is to have 2 OOD environments that act independently? (e.g. if you launch an interactive session in one, it doesn’t show up in the other).

As an aside, at OSC we currently run something like 4 different production OOD instances (along with corresponding dev/test versions), all of which share the same shared home directory.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [September 25, 2020, 1:53pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/4 "2020-09-25T13:53:57Z")

</div>

Can you be more specific about what these two OOD environments are (staging and development or different sites altogether)

As @azric pointed out you can change them so they’re logically different ‘sites’ if that’s the case. We do this, but the installations are logically different - even though they share the same NFS attachments.

We run dev/staging/prod with the same configurations and it’s fine. If this is your use case, then you only need to have the same `cluster.d` configs populated everywhere.

Here’s a topic on a similar issue from an LSF user who is running it in multi-cluster mode. If you’re running LSF in the same manner, this may be applicable to you.

> [@LSF multi-cluster environment deleting panel](https://discourse.openondemand.org/t/lsf-multi-cluster-environment-deleting-panel/963/25):
>
> You’re fine. My explanation was a bit wrong, so I went ahead and tested option 1 and confirmed the behavior. Here is the flow of finding a job and querying for it, so please refer back to it if needed: When OOD finds a job with cluster\_id = rka (on any site, rid, rka, my cluster at OSC, wherever) it will attempt to create an adapter for this cluster id (rka). It looks for a file called rka.yml (because the cluster\_id was rka. cluster\_id is the filename. The filename is the cluster\_id. This …

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [September 25, 2020, 2:53pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/5 "2020-09-25T14:53:31Z")

</div>

@alanc @jeff.ohrstrom we have two separate clusters for production and test and two OODs for each cluster. They share a home directory.

@azric I added `ondemand_portal: "ood2"` but still creating ondemand folder. Do I have to run something to apply the change?

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [September 25, 2020, 2:58pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/6 "2020-09-25T14:58:41Z")

</div>

> [@alanc](#):
>
> if you launch an interactive session in one, it doesn’t show up in the other

@alanc Currently, if I open my interactive sessions page in one, the existing interactive session in the other is disappeared.

---

<div class="post-metadata">

**Author:** ![alanc](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/alanc/32/2524_2.png) [@alanc](https://discourse.openondemand.org/u/alanc)\
**Post date:** [September 25, 2020, 3:14pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/7 "2020-09-25T15:14:42Z")

</div>

@gp4r can you describe the end state functionality you actually want? Do you want the interactive sessions to show up in both OOD instances? Do you want them to act completely independently and not show sessions started from the other?

As an aside, at OSC we currently have 3 physical clusters, 1 running SLURM the other 2 Torque/MOAB, and multiple OOD instances that can connect to all clusters, shared home directories and have interactive sessions show up across all of them.

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [September 25, 2020, 4:19pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/8 "2020-09-25T16:19:16Z")

</div>

@alanc Could you let me know both ways?

For the production and dev cluster, I want to show independently.

I am thinking about adding more OOD into production, this case I want multiple OODs show all sessions.

Do you use some kind of HA proxy to distribute traffics to multiple OODs?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [September 25, 2020, 4:52pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/9 "2020-09-25T16:52:27Z")

</div>

@gp4r if you’ve enabled `ondemand_portal: ood2` then you just need to restart your PUN (the restart web server option at the top right) for it to take affect.

If you want sessions to show up in both OOD instances, then both instances need to be carbon copies of each other. That means they have essentially the same `/etc/ood` directory (`nginx_stage.yml`, `cluster.d` directory, etc).

For them to be completely independent, then specifying a different `ondemand_portal` is the route you should take.

We do not use HA Proxy because each OOD instance is effectively a different site with no redundancy. For dev/staging/production - they all have the same configurations (notably they all point use the same `clusters.d` folder). For new logically seperate sites altogether (for instance ondemand.osc.edu vs `apps.totalsim.us` for our commercial clients) we use differing `ondemand_portal` configurations to separate them.

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [September 25, 2020, 5:53pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/10 "2020-09-25T17:53:05Z")

</div>

We removed the restart button on OOD, so I ran “/opt/ood/nginx\_stage/sbin/nginx\_stage nginx\_clean -f”

But it’s still creating ondemand folder.

[root@arcs config]# grep ondemand\_portal /etc/ood/config/nginx\_stage.yml  
#ondemand\_portal: null  
ondemand\_portal: ood2  
[root@arcs config]# /opt/ood/nginx\_stage/sbin/nginx\_stage nginx\_clean -f  
gp4r

Is " /opt/ood/nginx\_stage/sbin/nginx\_stage nginx\_clean -f" a correct command to restart PUN?

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [May 19, 2022, 3:31pm UTC](https://discourse.openondemand.org/t/interactive-job-disappearing-when-using-two-oods/1131/11 "2022-05-19T15:31:20Z")

</div>

Closed on May 19, 2022, 3:31pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
