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

Copy config files for FAM to server #14866

Merged
merged 1 commit into from
May 6, 2024

Conversation

Griffin-Sullivan
Copy link
Contributor

Problem Statement

Some tests are failing in production because we are missing live config settings for them. We also created some tech debt on the last PR, because we were doing inline config replacement with sed.

Solution

Host the config files ourselves and evaluate them with dynaconf before sending them to the server.

I won't be able to test this in PRT at the moment, but will open a jenkins PR for the right config settings. The current templates I copied into here are directly from https://github.com/theforeman/foreman-ansible-modules/tree/develop/tests/test_playbooks/vars

@Griffin-Sullivan Griffin-Sullivan added CherryPick PR needs CherryPick to previous branches 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Apr 23, 2024
@Griffin-Sullivan Griffin-Sullivan requested review from a team as code owners April 23, 2024 15:38
@rplevka
Copy link
Member

rplevka commented Apr 29, 2024

I'd suggest to keep all config related to FAM under a single config file, probably fam.yaml.
then have separate keys to denote the individual "sub" sections of it.

fam.yaml
|_FAM:
    |_ SERVER: {...}
    |_ COMPUTE_RESOURCE: {...}

Copy link
Member

@rplevka rplevka left a comment

Choose a reason for hiding this comment

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

pending config consolidation under a single file

if 'utils.manifest' in str(local_path):
if temp_file:
with NamedTemporaryFile(dir=robottelo_tmp_dir) as content_file:
content_file.write(str.encode(local_path))
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 going on here? how is this different from the utils.manifest case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly don't know how the path is being passed for the case where the local path contains utils.manifest. For my instance, I can at least say you aren't actually passing a path but rather a string. Whereas the manifest case does some sort of read() function. Maybe @JacobCallahan or @synkd could give us some insight here?

Copy link
Contributor

@synkd synkd May 3, 2024

Choose a reason for hiding this comment

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

The path is being passed by the upload_manifest helper [1], specifically in cases where we're uploading a manifest via CLI, rather than importing directly via API. In those cases, we need to pass the path of the manifest file to put it onto the Satellite before being imported with hammer. The third bullet point in this comment [2] describes these scenarios.

I think that, in cases where Manifester times out and we fail over to cloned manifests, the contents of the cloned manifest object need to be written to a file before transferring that file to the Satellite, whereas with Manifester, the file would already be present on the local file system. The check for utils.manifest is a way of distinguishing between Manifester and cloned manifests.

I hope this provides some measure of clarity. It is admittedly rather confusing.

[1]

def upload_manifest(self, org_id, manifest=None, interface='API', timeout=None):

[2] #12605 (comment)

@rplevka rplevka self-requested a review April 29, 2024 14:15
@Griffin-Sullivan Griffin-Sullivan force-pushed the fam-config branch 2 times, most recently from 571e3b6 to fb7fc06 Compare May 3, 2024 15:38
@Griffin-Sullivan
Copy link
Contributor Author

Need to wait for theforeman/foreman-ansible-modules#1732 to be merged now

@Griffin-Sullivan Griffin-Sullivan added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label May 6, 2024
@rplevka rplevka merged commit a6ce5f7 into SatelliteQE:master May 6, 2024
9 checks passed
github-actions bot pushed a commit that referenced this pull request May 6, 2024
github-actions bot pushed a commit that referenced this pull request May 6, 2024
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants