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

allow specifying of target host machine on every individual resource/data source #1072

Draft
wants to merge 65 commits into
base: main
Choose a base branch
from

Conversation

memetb
Copy link

@memetb memetb commented Feb 22, 2024

PR for issue #1071

The motivation of this PR is to allow proper abstractions when deploying to multiple host machines in a data center.

This PR adds an host argument to all resources and data sources. This argument is used for establishing a connection to the libvirt provider. If the argument is missing, the uri parameter of the provider is used as the default connection URI.

This feature allows for modules to determine where to allocate a specific resource inside a data center.

Memet Bilgin and others added 30 commits December 20, 2023 19:00
this allows different hosts (jump hosts) to have different identity files
specified
allow querying VM Host capabilities so that we can make decisions on what
resources to deploy. This can be things like machine architecture, but possibly
also to deploy VMs in a CPU topology manner
however tests aren't running right project wide and there will need to be a PR
to address this
provider now only stores the default URI but does no book-keeping of its own,
instead the Client class is used to manage provider connections
the lock is acquired after two calls to retrieve the volume pool and key. While
this is a potential slow down in those events where either one isn't found, it's
probably not a problem to be concerned about.
1. remove the lock management from the cloudinit_def as this is an abstraction
leak (also, the lock is acuqired very early in the call and has no performance
penalty unless there is a lookup failure)
2. fetch local `host` value when obtaining a connection or use default provider
URI instead if not found
1. move lock ownership to upper layer
2. obtain network connection on each action
if we are connecting to multiple servers for simulatenous creation of volumes,
there's no need to do this sequentially across all servers
the hostKeyCallback makes use of the SSH port and fails if a custom ssh port is
being used by the host
@memetb memetb marked this pull request as draft February 23, 2024 13:41
@memetb
Copy link
Author

memetb commented Feb 23, 2024

I have marked this as draft pending my cleanup of what looks like local merges from other PRs.

Specifically the PR #6 from memetb/graphics-none-option which is a PR that I merged on my forked repo.

For clarity, the present PR (#1072) is dependent on PR #1059 (the ssh upgrade) and that merge will not be reverted. There would be too much going back to make things work without it. So PR #1059 needs to be accepted before accepting #1072.

@memetb
Copy link
Author

memetb commented Feb 23, 2024

Incorrectly merged graphics-none-option has been removed. This PR is ready to go. Pending review.

As mentioned above, this PR is dependent on #1059, so reviewing and merging that PR will allow for easier review of this PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants