Skip to content

OCPBUGS-6859: Create empty manifest directory when installing MicroShift#1373

Merged
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
ggiguash:manifest_folder
Feb 20, 2023
Merged

OCPBUGS-6859: Create empty manifest directory when installing MicroShift#1373
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
ggiguash:manifest_folder

Conversation

@ggiguash
Copy link
Contributor

@ggiguash ggiguash commented Feb 14, 2023

The /etc/microshift/manifests empty directory is created when installing RPMs

Closes OCPBUGS-6859

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 14, 2023
@openshift-ci-robot
Copy link

@ggiguash: This pull request references Jira Issue OCPBUGS-6859, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

  • MicroShift attempts to load manifest files from /etc/microshift/manifests and /usr/etc/microshift/manifests directories
  • The /etc/microshift/manifests empty directory is created when installing RPMs
  • Clean up unused directories
/var/hpvolumes; \
/var/run/kubelet; \
/var/lib/kubelet/pods; \
/var/run/secrets/kubernetes.io/serviceaccount

Closes OCPBUGS-6859

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested review from copejon and sallyom February 14, 2023 19:53
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2023
@openshift-ci-robot
Copy link

@ggiguash: This pull request references Jira Issue OCPBUGS-6859, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

  • MicroShift attempts to load manifest files from /etc/microshift/manifests and /usr/etc/microshift/manifests directories
  • The /etc/microshift/manifests empty directory is created when installing RPMs
  • Clean up unused directories
/var/hpvolumes
/var/run/kubelet
/var/lib/kubelet/pods
/var/run/secrets/kubernetes.io/serviceaccount

Closes OCPBUGS-6859

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pmtk
Copy link
Member

pmtk commented Feb 15, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2023
@ggiguash
Copy link
Contributor Author

@pmtk , I missed a few places to replace the manifests directory. More files added now - can you look at it again?

Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

I don't know enough about the FHS standard to know why the original path may have been selected. @fzdarsky can you comment?

@ggiguash ggiguash force-pushed the manifest_folder branch 3 times, most recently from c773465 to 1f7d00c Compare February 16, 2023 15:48
@ggiguash ggiguash changed the title OCPBUGS-6859: Consolidate manifest directory location and clean up RPM spec file OCPBUGS-6859: Consolidate manifest directory location Feb 16, 2023
@openshift-ci-robot
Copy link

@ggiguash: This pull request references Jira Issue OCPBUGS-6859, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

  • MicroShift attempts to load manifest files from /etc/microshift/manifests and /usr/etc/microshift/manifests directories
  • The /etc/microshift/manifests empty directory is created when installing RPMs

Closes OCPBUGS-6859

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ggiguash
Copy link
Contributor Author

/retest

@dhellmann
Copy link
Contributor

This is going to trigger documentation updates, too.

What is the motivation for changing /usr/lib/ to /usr/etc/? How are those directories expected to be used on an ostree-based system?

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 16, 2023
@ggiguash
Copy link
Contributor Author

What is the motivation for changing /usr/lib/ to /usr/etc/? How are those directories expected to be used on an ostree-based system?

The reason is due to symmetry with config.yaml file, which is located in the /etc or /usr/etc pair.
So, the situation I was trying to fix is the following

  • /etc/microshift/config.yaml.default -> /usr/etc/
  • /etc/microshift/mamifests -> /usr/lib/microshift/manifests
    We had 2 configuration directories under /usr.

@ggiguash ggiguash changed the title OCPBUGS-6859: Consolidate manifest directory location OCPBUGS-6859: Consolidate manifest directory location and creation Feb 17, 2023
@dhellmann
Copy link
Contributor

What is the motivation for changing /usr/lib/ to /usr/etc/? How are those directories expected to be used on an ostree-based system?

The reason is due to symmetry with config.yaml file, which is located in the /etc or /usr/etc pair. So, the situation I was trying to fix is the following

  • /etc/microshift/config.yaml.default -> /usr/etc/
  • /etc/microshift/mamifests -> /usr/lib/microshift/manifests
    We had 2 configuration directories under /usr.

These paths have meanings, though, right? Each has a purpose and users are expected to put different types of content in each of them? How does https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html map to the parts of the filesystem that are readonly in ostree images?

@ggiguash ggiguash changed the title OCPBUGS-6859: Consolidate manifest directory location and creation OCPBUGS-6859: Create empty manifest directory when installing MicroShift Feb 20, 2023
@openshift-ci-robot
Copy link

@ggiguash: This pull request references Jira Issue OCPBUGS-6859, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The /etc/microshift/manifests empty directory is created when installing RPMs

Closes OCPBUGS-6859

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ggiguash
Copy link
Contributor Author

@dhellmann, I reverted the manifest directory change, as discussed.
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2023
Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

One open question but we can deal with it separately

/lgtm

install -p -m644 packaging/systemd/microshift.service %{buildroot}%{_unitdir}/microshift.service

install -d -m755 %{buildroot}/%{_sysconfdir}/microshift
install -d -m755 %{buildroot}/%{_sysconfdir}/microshift/manifests
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need /usr/lib/microshift and /usr/lib/microshift/manifests, too? Maybe we should add those in another PR, in case we change the names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The /usr/lib/microshift directory is not created at present.
Since we're talking about read-only directory structure that can only be updated from RPM, I thought it does not make sense to create an empty hierarchy.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I thought we might need to declare that we own that directory so that other RPMs can just put files into it.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, ggiguash, pmtk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [dhellmann,ggiguash,pmtk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 94cdb19 and 2 for PR HEAD 08df195 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2023

@ggiguash: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 172d1d7 into openshift:main Feb 20, 2023
@openshift-ci-robot
Copy link

@ggiguash: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-6859 has been moved to the MODIFIED state.

Details

In response to this:

The /etc/microshift/manifests empty directory is created when installing RPMs

Closes OCPBUGS-6859

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants