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

Check subs before start #14

Open
Rocco83 opened this issue Sep 5, 2016 · 3 comments
Open

Check subs before start #14

Rocco83 opened this issue Sep 5, 2016 · 3 comments

Comments

@Rocco83
Copy link
Contributor

Rocco83 commented Sep 5, 2016

The script should check the subs validity before start.

@evgeni
Copy link
Member

evgeni commented Sep 6, 2016

Makes sense, yeah.

There is already a storage we use for the quantity (to not talk to the API all the time): https://github.com/RedHatSatellite/katello-attach-subscription/blob/master/katello-attach-subscription#L90
The population of the data structure could be done upfront, instead of on the fly.
What do you think?

@Rocco83
Copy link
Contributor Author

Rocco83 commented Sep 8, 2016

I agree.

Moving on a little bit,
Based on #7

This is the current code that populate subs:
https://github.com/Rocco83/katello-attach-subscription/blob/203ba5e286ed3f297ddd59849cd8ebd3b3ed7a2b/katello-attach-subscription#L287

Short TODO:

  1. from YAML take only the key we need (subkey of sub: key https://github.com/Rocco83/katello-attach-subscription/blob/master/katello-attach-subscription.yaml-example#L12)
  2. flatten the data of YAML, removing duplicated subscriptions
  3. iterate the flatten data

Failing condition:

  • sub retrieval fail. This should be splitted in which condition we have (missing sub, general error, ...). But 400 general error is returned as now.

Current proposal:

  1. iterate across all of subscription and track the failed one. do not fail immediately in case of sub retrival failure.
  2. if only one sub fail, report all failed subscription suggesting to check the sub

Reverting to you, what do you think?

@evgeni
Copy link
Member

evgeni commented Dec 7, 2018

@Rocco83 correct me, but I think this was part of #26?

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

No branches or pull requests

2 participants