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

Patch hdd images before offline migration #2225

Closed
wants to merge 1 commit into from

Conversation

dgutu-suse
Copy link
Contributor

Patch all hdd images involved in offline migration scenarios.
First will be called the patching step and then the migration will start.
Patching testcases should contain variable PATCH=1

@dgutu-suse
Copy link
Contributor Author

dgutu-suse commented Dec 15, 2016

You may want to take a look at some of them - http://ain.arch.suse.de/tests/overview?distri=sle&version=12-SP3&build=0192&groupid=4

@dzedro
Copy link
Contributor

dzedro commented Dec 15, 2016

It can be done also without saving additional image, patch in test like here patch instead of ssh_key_check, and of course it will do upgrade when UPGRADE=1
Every run can be available new patches and we have to create new unique patched disk image or overwrite existing which can be right in that time used ?

@okurz
Copy link
Member

okurz commented Dec 15, 2016

how does this change relate to https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/2202/files ?

@dgutu-suse
Copy link
Contributor Author

@okurz Don't get what you want to hear

@okurz
Copy link
Member

okurz commented Dec 15, 2016

Well, to me it looks related. Isn't it redoing some of the same stuff? I guess you understand better than me what it is supposed to do and what #2202 is supposed to do because I don't understand :-)

@dgutu-suse dgutu-suse assigned dgutu-suse and unassigned dgutu-suse Dec 15, 2016
@dgutu-suse
Copy link
Contributor Author

dgutu-suse commented Dec 15, 2016

@okurz, if you mean the booting from hdd fact then, somehow its but very little :)

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a look into lib/utils.pm::minimal_patch_system. So far I am not convinced it is not the same.

$email = get_var("SCC_EMAIL");
$regcode = get_var("SCC_REGCODE");
$regcode_ha = get_var("SCC_REGCODE_HA");
$regcode_geo = get_var("SCC_REGCODE_GEO");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be get_required_var

@@ -0,0 +1,97 @@
# Patch SLE11* qcow2 images before migration (offline)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's somehow wrong, you also patch sle12, right? better just delete this line and optionally add something to '# Summary: ' further below

}
else {
$registration = script_output("suse_register -n -a email=$email -a regcode-sles=$regcode", 90);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about setting the options in a string first, e.g. something like

my $regopts;
if (get_required_var('SCC_REGCODE_GEO')) {
    $regopts = "regcode-sles=$regcode -a regcode-slehae=$regcode_ha -a regcode-slehaegeo=$regcode_geo";
}
elsif (get_required_var('SCC_REGCODE_HA')) {
    $regopts = "regcode-sles=$regcode -a regcode-slehae=$regcode_ha";
}
else {
    $regopts = "regcode-sles=$regcode";
}
$registration = script_output("suse_register -n -a email=$email $regopts");

should make it a bit more readable and prevents that line break in line 31/32

@dgutu-suse dgutu-suse added the WIP Work in progress label Dec 16, 2016
@okurz
Copy link
Member

okurz commented Dec 19, 2016

please rebase on current master and make sure your "os-autoinst" subfolder is up to date to use an updated style check. You may have to create a symlink to .perltidyrc manually, e.g. with ln -s os-autoinst/.perltidyrc

@dgutu-suse
Copy link
Contributor Author

I'm closing this PR because I re-worked testcase so this one is useless.

@dgutu-suse dgutu-suse closed this Jan 18, 2017
@dgutu-suse dgutu-suse deleted the patch_b4_migration branch January 26, 2017 16:10
@okurz
Copy link
Member

okurz commented Feb 9, 2017

@dgutu-suse please don't close PRs just because you are reworking your git history. I don't want to restate all comments in another PR again or look up old PRs to make sure nothing is overlooked. So please reopen this PR with updated changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants