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

When hdbuserstore ENV entry has IP address then HANA Cleaner fails when using -vlh flag. #20

Open
Darryl-G opened this issue Nov 4, 2021 · 6 comments

Comments

@Darryl-G
Copy link

Darryl-G commented Nov 4, 2021

Hello.

Running hanacleaner with "-vlh 127.0.0.1" if the hdbuserstore ENV entry has 127.0.0.1, then I get:

ERROR, local host, 127.0.0.1 , should be one of the hosts specified for the key, MYUSER (in case of virtual, please use -vlh, see --help for more info)

Looking at the code the determination of the variable "key_hosts" tries to trim off domain names, but this breaks IP addresses.
Maybe needs a check to see if the ENV key host string matches an IP address regex, before the FQDN trim is done.
I know that IP addresses are not ideal and a hostname (even localhost) is preferable, but 3rd party has setup the system this way. :-(

Thanks.

@dmcardlenl
Copy link

dmcardlenl commented Nov 5, 2021 via email

@Darryl-G
Copy link
Author

Darryl-G commented Nov 6, 2021 via email

@chriselswede
Copy link
Owner

Hi Darryl, thanks for the hint! Please check if latest version solves your issue?

@Darryl-G
Copy link
Author

Darryl-G commented Nov 9, 2021

Thanks. I will confirm tomorrow.

@Darryl-G
Copy link
Author

Darryl-G commented Nov 10, 2021

Morning. Same issue as before.
hanacleaner.py reports that 127.0.0.1 should be used and I am using it with -vlh.

ERROR, local host, 127.0.0.1 , should be one of the hosts specified for the key, MYUSER (in case of virtual, please use -vlh, see --help for more info)

I check hdbuserstore with "hdbuserstore list" and I see my key with the env:

KEY MYUSER ENV : 127.0.0.1:30013 USER: MYUSER
Edit: Formatting messed up that paste, but you get the gist.

@Darryl-G
Copy link
Author

Looking at the code, you may need to adjust this line also:
key_hosts = [env.split(':')[0].split('.')[0] for env in ENV] #if full host name is specified in the Key, only the first part is used

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

No branches or pull requests

3 participants