cardano-community / guild-operators

Artifacts and scripts created by Guild operators
https://cardano-community.github.io/guild-operators
MIT License
354 stars 177 forks source link

[CNTools/gLiveView] handle alternate name in internal updater #492

Closed Scitz0 closed 4 years ago

Scitz0 commented 4 years ago

When a non-default node is created using prereqs.sh -t <name> the new home variable <NAME>_HOME replace CNODE_HOME in all scripts. But if the built in updater in CNTools or gLiveView is used this variable is reset.

I see two possible solutions.

1) Check if a custom name is used and if so prompt the user to use prereqs script to update instead of using built-in. 2) Update the code in scripts to replace CNODE_HOME with the correct variable like prereqs script does.

Is there any preference between the two above suggested solutions or are there a third?

redoracle commented 4 years ago

I am more up for the first option because I am lazy 😜 since I don't want to change all dockerfiles and related scripts 😅

Normally a name convention has to be agreed for files name and variables and stick with it. Changing variables too much times can be not the best choice over time.

Michael

On Sun, Sep 20, 2020, 11:15 PM Ola [AHLNET] notifications@github.com wrote:

When a non-default node is created using prereqs.sh -t the new home variable _HOME replace CNODE_HOME in all scripts. But if the built in updater in CNTools or gLiveView is used this variable is reset.

I see two possible solutions.

  1. Check if a custom name is used and if so prompt the user to use prereqs script to update instead of using built-in.
  2. Update the code in scripts to replace CNODE_HOME with the correct variable like prereqs script does.

Is there any preference between the two above suggested solutions or are there a third?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cardano-community/guild-operators/issues/492, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEHHVMOIPXJ33DSOIG2J3SGZWHHANCNFSM4RT3KMWA .

Scitz0 commented 4 years ago

I am more up for the first option because I am lazy 😜 since I don't want to change all dockerfiles and related scripts 😅 Normally a name convention has to be agreed for files name and variables and stick with it. Changing variables too much times can be not the best choice over time. Michael … On Sun, Sep 20, 2020, 11:15 PM Ola [AHLNET] @.***> wrote: When a non-default node is created using prereqs.sh -t the new home variable _HOME replace CNODE_HOME in all scripts. But if the built in updater in CNTools or gLiveView is used this variable is reset. I see two possible solutions. 1. Check if a custom name is used and if so prompt the user to use prereqs script to update instead of using built-in. 2. Update the code in scripts to replace CNODE_HOME with the correct variable like prereqs script does. Is there any preference between the two above suggested solutions or are there a third? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#492>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEHHVMOIPXJ33DSOIG2J3SGZWHHANCNFSM4RT3KMWA .

I can't see how issue presented would affect docker files.

The feature to set a custom name/home folder and in turn, a modified custom HOME folder variable is already implemented in code. Its the way it was designed to work from the beginning, but recently fixed.

redoracle commented 4 years ago

Maybe because you are not using it, or at least in the way I do it anyway 😅 But what I'm saying is only to agree on one set of variables thinking about not planning to change it in the future.. Maybe is a good thing to see if there are other variables that can change. It can be changed of course, and I can modify my dockerfiles but I would like to avoid future invalidated docker images because of a major change like this I did not catch..

Kind Regards Michael

On Sun, Sep 20, 2020, 11:41 PM Ola [AHLNET] notifications@github.com wrote:

I am more up for the first option because I am lazy 😜 since I don't want to change all dockerfiles and related scripts 😅 Normally a name convention has to be agreed for files name and variables and stick with it. Changing variables too much times can be not the best choice over time. Michael … <#m8617334729659628751> On Sun, Sep 20, 2020, 11:15 PM Ola [AHLNET] @.***> wrote: When a non-default node is created using prereqs.sh -t the new home variable _HOME replace CNODE_HOME in all scripts. But if the built in updater in CNTools or gLiveView is used this variable is reset. I see two possible solutions.

  1. Check if a custom name is used and if so prompt the user to use prereqs script to update instead of using built-in. 2. Update the code in scripts to replace CNODE_HOME with the correct variable like prereqs script does. Is there any preference between the two above suggested solutions or are there a third? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#492 https://github.com/cardano-community/guild-operators/issues/492>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEHHVMOIPXJ33DSOIG2J3SGZWHHANCNFSM4RT3KMWA .

I can't see how issue presented would affect docker files.

The feature to set a custom name/home folder and in turn, a modified custom HOME folder variable is already implemented in code. Its the way it was designed to work from the beginning, but recently fixed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cardano-community/guild-operators/issues/492#issuecomment-695839944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEHHT5M73UGS2AULUUZTLSGZZG5ANCNFSM4RT3KMWA .

Scitz0 commented 4 years ago

You are correct in that I don't use docker so please share any issues you notice by using it this way.

With this said, the issue I raised here is not about the -t parameters existence or not. But how to solve the internal update function in CNTools and gLiveView when it is used. This is what I meant when I said that I couldn't see how issue opened could affect docker files.

So if you feel that multiple nodes should be handled in some other way please open a separate ticket for this.

rdlrt commented 4 years ago

replace CNODE_HOME in all scripts

prereqs.sh already does a sed for CNODE_HOME in few of the .sh files, just need to add that to gLiveView.sh and cntools.sh to apply that over update

Having said that, docker users should not be impacted as they use containers with one node per image, so they should continue to function as they have been

redoracle commented 4 years ago

Sorry mate,

I did not understand it at first. Thanks for explaining.

On Mon, 21 Sep 2020 at 01:38, Priyank notifications@github.com wrote:

replace CNODE_HOME in all scripts

prereqs.sh already does a sed for CNODE_HOME in few of the .sh files, just need to add that to gLiveView.sh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.