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

HANA_CALL - cdpy issue #124

Merged
merged 2 commits into from
Oct 19, 2022
Merged

Conversation

PeterPitterling
Copy link
Contributor

@PeterPitterling PeterPitterling commented Sep 29, 2022

the recent changes to avoid HDBSettings introduced 2 issues

a) cdpy is not found as highlighted in #121 and #122
b) inner timeout is only applied to 1st command; here cdpy and not the command chain

to fix a) see comments below
to fix b) cdpy or similar could be used within pre_script as provided by this PR

…HDBSetiings.sh is introducing a command chain for the python scripts "cdpy; python ....py"

a) cdpy is not found
b) inner timeout is only applied to 1st command .. here cdpy and not the command chain

2 Options
A) either get rid of inner timeout at all
B) use pre_script variable as offered by this PR
@PeterPitterling
Copy link
Contributor Author

Problem: Aliases are not always expanded within scripts !!!

In case sidadm is using posix shell (e.g. login shell /bin/sh) an alias is expanded. In case of /bin/bash it is not !!! That's the reason why it is sometimes available and sometimes not.

# /bin/sh -c "shopt expand_aliases"
expand_aliases  on
# /bin/bash -c "shopt expand_aliases"
expand_aliases  off
# /bin/bash -O expand_aliases -c "shopt expand_aliases"
expand_aliases  on

We have to either ensure that the cdpy alias is expanded or we just don't use the alias ..
a) always use POSIX shell
b) always expand cdpy
c) don't use cdpy alias

su - <sid>adm -s /bin/sh -c "(cdpy; python landscapeHostConfiguration.py)"
su - <sid>adm -c "(shopt -s expand_aliases; eval cdpy; python landscapeHostConfiguration.py)" 
su - <sid>adm -c '(cd $DIR_INSTANCE/exe/python_support; python landscapeHostConfiguration.py)'

@PeterPitterling PeterPitterling changed the title HANA_CALL - inner timeout and cdpy issue HANA_CALL - cdpy issue Oct 5, 2022
@PeterPitterling PeterPitterling marked this pull request as ready for review October 5, 2022 12:44
Copy link
Collaborator

@angelabriel angelabriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, many thanks for the effort

@angelabriel angelabriel merged commit 9c3756a into SUSE:master Oct 19, 2022
@PeterPitterling PeterPitterling deleted the fix-cdpy-timeout branch October 19, 2022 10:42
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.

2 participants