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

Unregister from SCC after worker finishes #1923

Closed
wants to merge 1 commit into from

Conversation

kravciak
Copy link
Contributor

@kravciak kravciak commented Oct 7, 2016

https://progress.opensuse.org/issues/11518

We need to consider canceled & failed jobs, so de-registration must be
performed from worker. It needs username & password that are generated
during registration and exported into SCC_DEREGISTER variable.

Worker unregister from scc using by calling SCC url with:
DELETE /connect/systems

There is a short window between system registration and set_var("SCC_DEREGISTER"), when system would not unregister.

Tested by:

  • Following logs in /var/lib/openqa/pool//autoinst-log.txt
  • By canceling jobs before/during/after registration or finishing them
  • Checking that SCC keys are removed from scc.suse.com (Alpha Keys)

After successful job:
SLES: http://dhcp91.suse.cz/tests/2772
JeOS: http://dhcp91.suse.cz/tests/2771

Job canceled:
QAM SLES-12-GA: http://dhcp91.suse.cz/tests/2778
SLES: http://dhcp91.suse.cz/tests/2774
JeOS: http://dhcp91.suse.cz/tests/2773

@kravciak kravciak added the WIP Work in progress label Oct 7, 2016
@okurz
Copy link
Member

okurz commented Oct 9, 2016

how did you test? Please describe the test procedure in the commit message

# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

#use base "basetest";
Copy link
Member

@okurz okurz Oct 9, 2016

Choose a reason for hiding this comment

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

delete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

sub setup_unregister_hook {
# Get file without switching console
# console("testapi_console")->type_string("stringstring");
# my $creds = console("install-shell")->script_output("cut -d= -f2 /etc/zypp/credentials.d/SCCcredentials");
Copy link
Member

Choose a reason for hiding this comment

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

what is this disabled code for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

We need to consider canceled & failed jobs, so de-registration must be
performed from worker. It needs username & password that are generated
during registration and exported into SCC_DEREGISTER variable.

Worker unregister from scc using by calling SCC url with:
DELETE /connect/systems

There is a short window between system registration and
set_var("SCC_DEREGISTER"), when system would not unregister.

Tested by:
- Following logs in /var/lib/openqa/pool/<worker>/autoinst-log.txt
- By canceling jobs before/during/after registration or finishing them
- Checking that SCC keys are removed from scc.suse.com (Alpha Keys)
@kravciak kravciak added WIP Work in progress and removed WIP Work in progress labels Oct 10, 2016
@mimi1vx
Copy link
Member

mimi1vx commented Oct 14, 2016

@coolo @kravciak I think this implementation broke all Chained tests with stored image and testing anything with zypper *

It needs more granularity to set when and where deregister ( How to deregister after last chained job ? )

@coolo
Copy link
Contributor

coolo commented Oct 15, 2016

First of all: this change is not merged/deployd - so it didn't break anything yet. But I guess you're right, it will.

So we need to treat scc registrations like assets - and unregister the least used used. I.e. do parts of what Martin did and upload the keys used in a job. But don't unregister immediately, but from a background job on the webui

@kravciak kravciak closed this Oct 18, 2016
@kravciak
Copy link
Contributor Author

Thanks for noticing, we missed this when talking to qam/slenkins people about breaking stuff with this approach

@kravciak kravciak deleted the scc branch June 5, 2017 14:44
@kravciak kravciak restored the scc branch June 5, 2017 14:44
@kravciak kravciak deleted the scc branch August 29, 2017 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants