-
Notifications
You must be signed in to change notification settings - Fork 242
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
This patch will instaall targetcli-fb package to bionic version. #1445
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: prudhvi <[email protected]>
if distro.detect().version == '18' and distro.detect().name == 'Ubuntu': | ||
iscsi_package = ["targetcli-fb"] | ||
else: | ||
iscsi_package = ["targetcli"] |
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.
have try... block,
to handle it generic for all distros, future some other distro versions might also have this naming.
...
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.
if i try to install targetcli on 18.04 version it will not error out because wait_for_login(), and some times guest got crashed.
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.
The better way for this would to implement a API in utils_package that would give you the package name by querying irrespective of distro, like yum whatprovides targetcli
in this case for RHEL based package manager and similar in Ubuntu
@@ -843,7 +843,10 @@ def create_iSCSI(params, root_dir=data_dir.get_tmp_dir()): | |||
raise exceptions.TestError("Failed to install iscsi initiator" | |||
" packages") | |||
# Install linux iscsi target software targetcli | |||
iscsi_package = ["targetcli"] | |||
if distro.detect().version == '18' and distro.detect().name == 'Ubuntu': |
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.
This would break in future Ubuntu releases,
iscsi_package = ["targetcli"]
if distro.detect().name == 'Ubuntu' and int(distro.detect().version) >= 18:
iscsi_package = ["targetcli-fb"]
if distro.detect().version == '18' and distro.detect().name == 'Ubuntu': | ||
iscsi_package = ["targetcli-fb"] | ||
else: | ||
iscsi_package = ["targetcli"] |
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.
The better way for this would to implement a API in utils_package that would give you the package name by querying irrespective of distro, like yum whatprovides targetcli
in this case for RHEL based package manager and similar in Ubuntu
This patch will instaall targetcli-fb package to bionic version. Existing tagetcli package name changed to targetcli-fb in bionic
Signed-off-by: prudhvi [email protected]