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

Add guest repo management plugin #426

Open
ifireball opened this issue Jan 15, 2017 · 2 comments · May be fixed by #465
Open

Add guest repo management plugin #426

ifireball opened this issue Jan 15, 2017 · 2 comments · May be fixed by #465
Assignees
Milestone

Comments

@ifireball
Copy link

When running complex test scenarios in Lago one of the tasks that frequently needs to be done, is manipulation of the YUM repository configuration for guests. Some common manipulations are:

  • Adding a local repositoy created with lago ovirt reposetup.
  • Ensuring that guests only use a controlled set of repos
  • Injection yum settings to guests, like enforcing the usage of a proxy server.

Right now these task are typically done by means of the deploy script or by using a mix of lago shell and lago copy-to-vm commands.

It is desirable to have higher-level Lago commands to allow such manipulations. I suggest all such commands be implemented inside a yumconfig plugin. Here is a detailed description of commands:

  • lago yumconfig inject [--strip-excludes] <vm_name> <yum.conf_name> - Inject the given full yum configuration to a vm, Overriding all other configuration. --strip-excludes strips yum exclude directives from configuration before adding.
  • lago yumconfig add [--strip-excludes] [--set-exclusive] <vm_name> <yum.conf_name> - Add the given yum configuration to the guest existing configuration. --strip-excludes is like in inject. --set-exclusive insures that all packages that are included in the added repos are excluded from all the guest pre-existing repos.
  • lago yumconfig inject-local-repo [--strip-excludes] <vm_name> - Replace all guest yum configuration with a configuration that only includes the local repository created with lago ovirt reposetup.
  • lago yumconfig add-local-repo [--strip-excludes] [--set-exclusive] <vm_name> - Add local repository created with lago ovirt reposetup to guest existing configuration.
  • lago yumconfig inject-host-config, lago yumconfig add-host-config - Add or inject yum configuration from the host Lago is currently running on.
@nvgoldin
Copy link
Contributor

Sounds like a good enhancement!
I'm wondering if some of those tasks could be done with yum-config-manager, not sure if it allows such fine-grained control(i.e. add/remove exlude/includes).

@ifireball
Copy link
Author

I thing a more flexible and reliable approach in the long run would be to actually make Lago able to parse yum config files. It shouldn't be difficult since those are just Python ConfigParser files. I wouldn't want to use a guest-side tool like yum-config-manager because:

  • It would require the tool to be installed on the guest.
  • It would require the guest to actually be up (As opposed to enabling the manipulation while the guest is done via libguestfs)

@gbenhaim gbenhaim linked a pull request Mar 2, 2017 that will close this issue
@eedri eedri modified the milestone: 0.39 Apr 30, 2017
@nvgoldin nvgoldin modified the milestones: 0.40, 0.39 May 15, 2017
@gbenhaim gbenhaim modified the milestones: 0.40, 0.41 Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants