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

ra/* - hdbMap usage should be revised #114

Open
PeterPitterling opened this issue Aug 28, 2022 · 5 comments
Open

ra/* - hdbMap usage should be revised #114

PeterPitterling opened this issue Aug 28, 2022 · 5 comments

Comments

@PeterPitterling
Copy link
Contributor

SAPHana - is not used at all and can be removed

hdbMap="hdbnsutil -sr_state"

SAPHanaTopology - only used for >= 1.00.111 - sr_state never ever called

hdbMap="hdbnsutil -sr_state"

    hdbMap="hdbnsutil -sr_state"
    if version "$hdbver" ">=" "1.00.111"; then
        hdbState="hdbnsutil -sr_stateConfiguration"
        hdbMap="hdbnsutil -sr_stateHostMapping"
    fi

    if version "$hdbver" ">=" "1.00.111"; then
        hdbANSWER=$(HANA_CALL --timeout "$HANA_CALL_TIMEOUT" --cmd "$hdbMap --sapcontrol=1" 2>/dev/null)
    fi
@fmherschel
Copy link
Member

fmherschel commented Aug 29, 2022

@PeterPitterling In SAPHana the version is also used to decide, if we have the new parameter-set for -sr_register or the new one:
in SAPHana it's line 1460. And yes that is also for a very old SAP HANA version (1.00.110) in this case.

if version "$hdbver" ">=" "1.00.110"; then

SAPHanaTopology in

hdbANSWER=$(HANA_CALL --timeout "$HANA_CALL_TIMEOUT" --cmd "$hdbState --sapcontrol=1" 2>/dev/null)
the command which is content of $hdbState is called. For old SAP HANA dbs this is the old
command -sr_state. With higther versions this was forbidden to be called, if it is not guaranteed, that the SAP HANA nameserver is running at this time.

@PeterPitterling
Copy link
Contributor Author

I'm referring to hdbMap only .. not hdbvers nor hdbState.

hdbMap is only assigned, but never used within SAPHana
hdbMap is only used for >=111 releases within SAPHanaTopology. For older releases hdbMap=sr_state is not called. The assignment is therefore not required for <111

@fmherschel
Copy link
Member

Thanks, @PeterPitterling. But that does not help to get rid of the HDB version.

@PeterPitterling
Copy link
Contributor Author

PeterPitterling commented Aug 29, 2022

Thanks, @PeterPitterling. But that does not help to get rid of the HDB version.

true, but this issue is not talking about HDB version ?!

@fmherschel
Copy link
Member

But yes we could remove Lines 1001+1004 in SAPHana and 568 in SAPHanaTopology (which surprises me, because AFAIR we also used mapping for those versions. Maybe it is a bug in lines 624ff. it seams we lost the code for the mapping for SAP HANA 1.00.111 and nobody reported this ;-) Also an argument to get rid of the HDB version.

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

2 participants