Bug 1330049 - Import classes\environments suggests add\remove based on results from target capsule
Summary: Import classes\environments suggests add\remove based on results from targe...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard: centralci
Depends On:
Blocks: 1338516
TreeView+ depends on / blocked
 
Reported: 2016-04-25 10:52 UTC by Alexander Braverman
Modified: 2018-09-04 17:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 17:45:37 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21115 0 None None None 2017-09-27 06:48:45 UTC

Description Alexander Braverman 2016-04-25 10:52:35 UTC
Description of problem:
Lets say there are two capsules, external A and Satellite internal.
If Puppet environment wasn't synced to one of capsules, then import from that capsule will suggest to remove\add the classes\environment.
This requires the user to hand pick the correct changes.

Version-Release number of selected component (if applicable):
Snap 8.2

How reproducible:
Always

Steps to Reproduce:
1. Add two capsules to the organization with life cycle Library
2. Publish new Content view with Puppet modules to life cycle Library
3. Make sure the Environment doesn't exist on one of the capsules (This can happen for many reasons) for example Capsule A.
4. Go to Puppet environments page
5. click "import from capsule-a.com" at the top of the page

Actual results:
In the list of changes, there will be an option to remove the puppet environment we created. This is False option.

Expected results:
List of changes that are correspond to description in Satellite.

Additional info:

Comment 1 Ivan Necas 2016-04-26 19:54:38 UTC
Could you descirbe more on what "List of changes that are correspond to description in Satellite" means?

Comment 2 Alexander Braverman 2016-04-27 12:42:45 UTC
"List of changes that are correspond to description in Satellite", example:
Content view "my_content_view" has a published version in "Library" life cycle, with Puppet module "stdlib" by "puppetlabs". Capsule A doesn't have the puppet environment synced.
Current result of "import from capsule-a.com", is a suggestion of removal "stdlib" class or the entire puppet environment of "my_content_view" (depends on which button you click).

Expected results:
No changes suggested

Improvement:
warning message regarding difference in Satellite description of the "my_content_view" puppet environment and actual files in Capsule.

Comment 3 Ivan Necas 2016-04-27 13:12:09 UTC
Thanks, marking this for sat-future as this will need some design first to support this case.

Comment 4 Ivan Necas 2016-04-27 13:49:29 UTC
Looking at this from different angle, I think it's still valuable to differentiate between what's is planned to be on the capsule vs. what's actually synchronized. What about just making it clear when importing the classes from capsule, that the capsule was not synchornized and refusing to do the import until it's done?

Comment 6 Alexander Braverman 2016-04-27 14:02:21 UTC
Listing the difference is a good idea, but:
1. the user doesn't need to actually try to import to get a refuse, just have specific environment grayed out\un-selectable with a note that it is not properly synced.
2. environments that doesn't have problems should allow import
3. this must not effect hammer execution (hammer doesn't support fine selection of imports)

Comment 7 Ivan Necas 2016-04-27 15:44:10 UTC
So in hammer, it would sync just the environments that were properly synced, right and skip the rest, right?

Comment 8 Alexander Braverman 2016-05-01 07:43:31 UTC
Ivan, c(In reply to Ivan Necas from comment #7)
> So in hammer, it would sync just the environments that were properly synced,
> right and skip the rest, right?

Correct. A message about skipped environments will be helpful.

Comment 9 Ivan Necas 2017-09-15 13:57:01 UTC
Thinking about it with fresh mind, it seems the right thing to do would be to provide ability to import from all the capsules as once: this way we would not offer to delete the environments if there is at least one proxy with it. Would that work for you Alexander?

Comment 10 Ivan Necas 2017-09-15 13:58:21 UTC
@onjdrej: if https://bugzilla.redhat.com/show_bug.cgi?id=1330049#c9 would be valid fix, I would suggest to keep it in configuration management component

Comment 11 Alexander Braverman 2017-09-17 07:39:33 UTC
That means that if one capsule is in a bad state, then no matter what, Satellite will keep the classes and environments in the system. I can't think of other issues it can cause, but I think people will find it annoying.

How about disable the feature for regular capsules. I mean if its under control of Satellite, then it doesn't really need to do the whole class\environment import from remote capsule, it just has to be in sync. For special cases where puppet environments are managed by third party (i.e r10k), if it is supported, Satellite will allow tracking "external" puppet modules and environments. what do you think?

Comment 12 Ondřej Pražák 2017-09-25 15:44:30 UTC
Importing from all capsules has a catch - you would have to make sure that the subset of your capsules that have the environments you want to keep is online/reachable.

If environments do not have to be imported and being properly synced is all that is needed, then why even attempt the import?

The thing that seems strange to me is that if 2 proxies have an environment with the same name and different puppet modules and we try to import from both, we always modify the same environment. Is this a bug or a feature? Shouldn't we keep track where we imported the stuff from?

Comment 13 Ivan Necas 2017-09-25 18:38:57 UTC
If we assume that the internal capsule is always reachable, (well, if it isn't, we have a problem anyway), than this eliminates the whole set of issues described here: if the internal capsule is not reachable, that we would just refuse to the the import.

Anyway, @ondrej: your thinking about the origin of the environments/classes is right: if we had the link to those, we would know that we can only remove, when we have no links from proxies to the envs/classes. I think fixing that would also resolve the original issue

Comment 14 Ondřej Pražák 2017-09-27 06:48:42 UTC
Created redmine issue http://projects.theforeman.org/issues/21115 from this bug

Comment 15 Ondřej Pražák 2017-09-27 06:52:57 UTC
Cloned into upstream and proposed adding a link to import source, thanks everyone for ideas and suggestions.

Comment 16 Bryan Kearney 2018-09-04 17:45:37 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


Note You need to log in before you can comment on or make changes to this bug.