Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 16: * update_tracker: OK * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Dan Kenigsberg has submitted this change and it was merged. Change subject: infra tests: added functional test for upgrading vdsm .. infra tests: added functional test for upgrading vdsm the tests checks if vdsmd is active after vdsm upgrade Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Signed-off-by: Irit GoihmanReviewed-on: https://gerrit.ovirt.org/61186 Continuous-Integration: Jenkins CI Reviewed-by: Yaniv Bronhaim Reviewed-by: Piotr Kliczewski --- M automation/check-merged.sh M tests/functional/Makefile.am A tests/functional/upgrade_vdsm_test.py 3 files changed, 83 insertions(+), 2 deletions(-) Approvals: Piotr Kliczewski: Looks good to me, approved Yaniv Bronhaim: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Irit Goihman: Verified -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Piotr Kliczewski has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 15: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Yaniv Bronhaim has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 15: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 15: http://jenkins.ovirt.org/job/vdsm_master_check-merged-el7-x86_64/297/ job ended successfully -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 15: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 14: (1 comment) https://gerrit.ovirt.org/#/c/61186/14/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: PS14, Line 40: 4.17.10.1-0 > why to downgrade to this specific version? There isn't any specific reason, I just wanted to make sure that a package from 3.6 version will be installed. -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Piotr Kliczewski has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 14: (1 comment) https://gerrit.ovirt.org/#/c/61186/14/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: PS14, Line 40: 4.17.10.1-0 why to downgrade to this specific version? -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Yaniv Bronhaim has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 14: please trigger check_merged job so we'll see the output - jenkins.ovirt.org/job/vdsm_master_check-merged-fc24-x86_64/ -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 14: Verified+1 passes in jenkins -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 14: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 13: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 12: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 11: (11 comments) https://gerrit.ovirt.org/#/c/61186/10/tests/functional/Makefile.am File tests/functional/Makefile.am: Line 1: # Line 2: # Copyright 2012-2016 Red Hat, Inc. > 6 ? Done Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or https://gerrit.ovirt.org/#/c/61186/8/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 43: def upgrade_vdsm(): Line 44: run_command(['yum-config-manager', '--enable', 'localsync']) Line 45: run_command(['yum', 'update', '-y', 'vdsm']) Line 46: Line 47: > why? if it didn't start after the upgrade, it won't start on tearDown Done Line 48: class UpgradeTest(VdsmTestCase): Line 49: def setUp(self): Line 50: run_command(['yum-config-manager', '--disable', 'localsync']) Line 51: Line 45: run_command(['yum', 'update', '-y', 'vdsm']) Line 46: Line 47: Line 48: class UpgradeTest(VdsmTestCase): Line 49: def setUp(self): > Do a test also that verifies that if vdsmd was down, after upgrade it's sti Done Line 50: run_command(['yum-config-manager', '--disable', 'localsync']) Line 51: Line 52: def tearDown(self): Line 53: run_command(['yum-config-manager', '--disable', '*ovirt-3.6*']) https://gerrit.ovirt.org/#/c/61186/10/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 21: from vdsm.tool.service import service_start, service_status, service_stop Line 22: Line 23: from testlib import VdsmTestCase Line 24: Line 25: el7_ovirt36_repo = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/' > f22_ovirt36_repo.. already asked for renaming the global to something more Done Line 26: Line 27: Line 28: def run_command(command): Line 29: p = subprocess.Popen(command, stdout=subprocess.PIPE, Line 24: Line 25: el7_ovirt36_repo = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/' Line 26: Line 27: Line 28: def run_command(command): > Using same arguments names as the underlying api (stdout, stderr) is better Done Line 29: p = subprocess.Popen(command, stdout=subprocess.PIPE, Line 30: stderr=subprocess.PIPE) Line 31: out, err = p.communicate() Line 32: if p.returncode != 0: Line 28: def run_command(command): Line 29: p = subprocess.Popen(command, stdout=subprocess.PIPE, Line 30: stderr=subprocess.PIPE) Line 31: out, err = p.communicate() Line 32: if p.returncode != 0: > Include rc, out, and err in the exception, we want to see all the available Done Line 33: raise Exception(command, p.returncode, out, err) Line 34: return out Line 35: Line 36: Line 33: raise Exception(command, p.returncode, out, err) Line 34: return out Line 35: Line 36: Line 37: def downgrade_vdsm(url): > This must also be reverted after the test. Done Line 38: run_command(['yum-config-manager', '--add-repo', url]) Line 39: run_command(['yum', 'swap', '--', 'erase', '-y', 'vdsm\*', Line 40: '--', 'install', '-y', 'vdsm-4.17.10.1-0.el7.centos.noarch']) Line 41: Line 35: Line 36: Line 37: def downgrade_vdsm(url): Line 38: run_command(['yum-config-manager', '--add-repo', url]) Line 39: run_command(['yum', 'swap', '--', 'erase', '-y', 'vdsm\*', > Why not vdsm-4.17? can work on any platform. it didn't work for me Line 40: '--', 'install', '-y', 'vdsm-4.17.10.1-0.el7.centos.noarch']) Line 41: Line 42: Line 43: def upgrade_vdsm(): Line 48: class UpgradeTest(VdsmTestCase): Line 49: def setUp(self): Line 50: run_command(['yum-config-manager', '--disable', 'localsync']) Line 51: Line 52: def tearDown(self): > This will change the host state after running these tests, bad idea. We wan Done Line 53: run_command(['yum-config-manager', '--disable', '*ovirt-3.6*']) Line 54: run_command(['yum-config-manager', '--enable', 'localsync']) Line 55: # make sure vdsm is installed and running Line 56: run_command(['yum', 'install', '-y', 'vdsm']) Line 50: run_command(['yum-config-manager', '--disable', 'localsync']) Line 51: Line 52: def tearDown(self): Line 53: run_command(['yum-config-manager', '--disable', '*ovirt-3.6*']) Line 54: run_command(['yum-config-manager', '--enable', 'localsync']) > Not needed, setUp will fail without catching and raising again the exceptio Done Line 55: # make sure vdsm is installed and running Line 56: run_command(['yum', 'install', '-y', 'vdsm']) Line 57: service_start('vdsmd') Line 58: Line 65:
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 11: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Nir Soffer has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 10: (7 comments) https://gerrit.ovirt.org/#/c/61186/10/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 24: Line 25: repo_url = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/' Line 26: Line 27: Line 28: def run_command(command, out_pipe=subprocess.PIPE, err_pipe=subprocess.PIPE): Using same arguments names as the underlying api (stdout, stderr) is better, make it easier to understand what you are trying to do, but in this case we don't need these, so best would be to remove this arguments and use stdout=subprocess.PIPE... Line 29: p = subprocess.Popen(command, stdout=out_pipe, stderr=err_pipe) Line 30: out, err = p.communicate() Line 31: if p.returncode != 0: Line 32: raise Exception(err) Line 28: def run_command(command, out_pipe=subprocess.PIPE, err_pipe=subprocess.PIPE): Line 29: p = subprocess.Popen(command, stdout=out_pipe, stderr=err_pipe) Line 30: out, err = p.communicate() Line 31: if p.returncode != 0: Line 32: raise Exception(err) Include rc, out, and err in the exception, we want to see all the available info in case of failures. Line 33: return out Line 34: Line 35: Line 36: def downgrade_vdsm(url): Line 33: return out Line 34: Line 35: Line 36: def downgrade_vdsm(url): Line 37: run_command(['dnf', 'config-manager', '--add-repo', url]) This must also be reverted after the test. Line 38: run_command(['dnf', '--allowerasing', 'install', '--nogpgcheck', Line 39: '-y', 'vdsm-4.17.10.1-0.fc22.noarch']) Line 40: Line 41: Line 35: Line 36: def downgrade_vdsm(url): Line 37: run_command(['dnf', 'config-manager', '--add-repo', url]) Line 38: run_command(['dnf', '--allowerasing', 'install', '--nogpgcheck', Line 39: '-y', 'vdsm-4.17.10.1-0.fc22.noarch']) Why not vdsm-4.17? can work on any platform. Line 40: Line 41: Line 42: def upgrade_vdsm(): Line 43: run_command( Line 48: class UpgradeTest(VdsmTestCase): Line 49: def setUp(self): Line 50: try: Line 51: run_command( Line 52: ['dnf', 'config-manager', '--set-disabled', 'localsync']) This will change the host state after running these tests, bad idea. We want to avoid such global changes that may break other tests. The best would be to save the original value of this configuration, then modify it during the tests, and restore the original value when the tests ends (in tearDown). Line 53: except Exception as e: Line 54: self.fail(e) Line 55: Line 56: def service_up_test(self): Line 50: try: Line 51: run_command( Line 52: ['dnf', 'config-manager', '--set-disabled', 'localsync']) Line 53: except Exception as e: Line 54: self.fail(e) Not needed, setUp will fail without catching and raising again the exception. try here is needed only if you want to cleanup after failures during setup. Line 55: Line 56: def service_up_test(self): Line 57: service_start('vdsmd') Line 58: try: Line 65: self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version) Line 66: self.assertEqual(service_status('vdsmd'), 0) Line 67: Line 68: def service_down_test(self): Line 69: service_stop('vdsmd') This assume that vdsm is installed and running - what if the previous test left the host in bad state, vdsm partly installed or not installed? Line 70: try: Line 71: vdsm_version = run_command(['rpm', '-q', 'vdsm']) Line 72: downgrade_vdsm(repo_url) Line 73: upgrade_vdsm() -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Yaniv Bronhaim has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 10: (3 comments) https://gerrit.ovirt.org/#/c/61186/10/tests/functional/Makefile.am File tests/functional/Makefile.am: Line 1: # Line 2: # Copyright 2012-2013 Red Hat, Inc. 6 ? Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or https://gerrit.ovirt.org/#/c/61186/10/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 21: from vdsm.tool.service import service_start, service_status, service_stop Line 22: Line 23: from testlib import VdsmTestCase Line 24: Line 25: repo_url = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/' f22_ovirt36_repo.. already asked for renaming the global to something more meaningful Line 26: Line 27: Line 28: def run_command(command, out_pipe=subprocess.PIPE, err_pipe=subprocess.PIPE): Line 29: p = subprocess.Popen(command, stdout=out_pipe, stderr=err_pipe) Line 48: class UpgradeTest(VdsmTestCase): Line 49: def setUp(self): Line 50: try: Line 51: run_command( Line 52: ['dnf', 'config-manager', '--set-disabled', 'localsync']) we need to change to yum if we want to run over centos Line 53: except Exception as e: Line 54: self.fail(e) Line 55: Line 56: def service_up_test(self): -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 10: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 9: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Yaniv Bronhaim has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 8: (4 comments) https://gerrit.ovirt.org/#/c/61186/8/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 38: try: Line 39: run_command( Line 40: ['dnf', 'config-manager', '--set-disabled', 'localsync']) Line 41: except Exception: Line 42: raise so why do you need to catch that? let it raise Line 43: Line 44: service_start('vdsmd') Line 45: Line 46: def tearDown(self): Line 43: Line 44: service_start('vdsmd') Line 45: Line 46: def tearDown(self): Line 47: service_start('vdsmd') why? if it didn't start after the upgrade, it won't start on tearDown Line 48: Line 49: def upgrade_test(self): Line 50: try: Line 51: vdsm_version = run_command(['rpm', '-q', 'vdsm']) Line 48: Line 49: def upgrade_test(self): Line 50: try: Line 51: vdsm_version = run_command(['rpm', '-q', 'vdsm']) Line 52: run_command(['dnf', 'config-manager', '--add-repo', _url]) _url should be named fc22_repo_url to be more clear, and have the same for other repos. or maybe it should be repo_url='http://resources.ovirt.org/pub/ovirt-3.6/rpm/%s/' Line 53: run_command(['dnf', '--allowerasing', 'install', '--nogpgcheck', Line 54: '-y', 'vdsm-4.17.10.1-0.fc22.noarch']) Line 55: run_command( Line 56: ['dnf', 'config-manager', '--set-enabled', 'localsync']) Line 55: run_command( Line 56: ['dnf', 'config-manager', '--set-enabled', 'localsync']) Line 57: run_command(['dnf', 'update', '-y', 'vdsm']) Line 58: except Exception: Line 59: raise same? Line 60: Line 61: self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Yaniv Bronhaim has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 8: (2 comments) https://gerrit.ovirt.org/#/c/61186/8/tests/functional/upgrade_vdsm_test.py File tests/functional/upgrade_vdsm_test.py: Line 45: Line 46: def tearDown(self): Line 47: service_start('vdsmd') Line 48: Line 49: def upgrade_test(self): Do a test also that verifies that if vdsmd was down, after upgrade it's still down. Line 50: try: Line 51: vdsm_version = run_command(['rpm', '-q', 'vdsm']) Line 52: run_command(['dnf', 'config-manager', '--add-repo', _url]) Line 53: run_command(['dnf', '--allowerasing', 'install', '--nogpgcheck', Line 58: except Exception: Line 59: raise Line 60: Line 61: self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version) Line 62: self.assertEqual(service_status('vdsmd'), 0) shouldn't it be assertNotEqual? -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 8: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 6: Verified+1 -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
Irit Goihman has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 5: Verified+1 functional.supervdsmFuncTests.TestSuperVdsmRemotly 20:11:30 testKsmAction OK 20:11:30 testPingCallOK 20:11:30 functional.upgrade_vdsm_test.UpgradeTest 20:11:30 upgrade_test -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: infra tests: added functional test for upgrading vdsm
gerrit-hooks has posted comments on this change. Change subject: infra tests: added functional test for upgrading vdsm .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61186 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I589a73fa5285983f7d1adcdae49fc7bffb05bec4 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit GoihmanGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org