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
[AMBARI-23531]. Debian9: Atlas client installation failed due to unsupported OS family error (amagyar) #959
Conversation
…orted OS family error (amagyar)
Refer to this link for build results (access rights to CI server needed): |
@@ -61,6 +61,7 @@ def get_new_instance(cls, os_family=None): | |||
|
|||
construct_rules = { | |||
OSConst.UBUNTU_FAMILY: AptManager, | |||
OSConst.DEBIAN_FAMILY: AptManager, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's strange, i have supposed that DEBIAN is a child of the UBUNTU family, as it extends it. Problem will repeat with *-PPC variation of the system families. Could we extend OsFamily to return the root os family, not the extended leaf and use it in the constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hapylestat, I don't fully understand what you suggest.
The problem is that OSConst.UBUNTU_FAMILY is a simple string so it won't match to OSConst.DEBIAN_FAMILY.
>>> type(os_check.OSConst.OS_UBUNTU)
<type 'str'>
However this one works correctly and returns True on Debian.
>>> os_check.OSCheck.is_ubuntu_family()
True
So instead of the map lookup we could modify it to something like this:
@classmethod
def get_new_instance(cls, os_family=None):
"""
Construct new instance of Repository Manager object. Call is not thread-safe
:param os_family: os family string; best used in combination with `OSCheck.get_os_family()`
:type os_family str
:rtype GenericManager
"""
if not os_family:
os_family = OSCheck.get_os_family()
if OSCheck.is_in_family(os_family, OSConst.UBUNTU_FAMILY):
return AptManager()
if OSCheck.is_in_family(os_family, OSConst.SUSE_FAMILY):
return ZypperManager()
if OSCheck.is_in_family(os_family, OSConst.REDHAT_FAMILY):
return YumManager()
if OSCheck.is_in_family(os_family, OSConst.WINSRV_FAMILY):
return ChocoManager()
raise RuntimeError("Not able to create Repository Manager object for unsupported OS family {0}".format(os_family))```
…y error (amagyar)
Refer to this link for build results (access rights to CI server needed): |
* origin/trunk: [AMBARI-23531]. Debian9: Atlas client installation failed due to unsupported OS family error (amagyar) (apache#959) [AMBARI-23486] Move SSO-related properties from ambari.properties into the Ambari DB [AMBARI-23494] Incorrect servicerpc address configs being generated by NN Federation wizard. Second patch. (akovalenko) (apache#961) AMBARI-23498. Default shared edits location should be preserved. Fixing issues after resolving merge confilcts. (akovalenko) AMBARI-23459. ServiceAdvisor KeyError during kerberization of OneFS (amagyar) AMBARI-23386 HSI ADDENDUM Jdbc URL should handle HA mode (mgergely) [AMBARI-23431] Removing hostId condition in order to process AMBARI identities even if there was an agent installed on the server's host (apache#897) [AMBARI-23487] Cannot tell which services are in maintenance mode. (apache#909) [AMBARI-23483] Hosts Breadcrumb doesn't persist filters. [AMBARI-23481] Selected Hosts dropdown is disabled after navigating away and coming back to hosts page.
What changes were proposed in this pull request?
Package installation on debian failed "Not able to create Repository Manager object for unsupported OS family" error.
How was this patch tested?
Installed HDP on debian.