openshift/machine-config-operator

MCD: Actually handle directories and symlinks

jlebon opened this issue · 16 comments

Right now, we're only handling the files list of the storage section. We should support directories and links too.

I started on this, but honestly I'm wondering if maybe we should discuss coreos/ignition#599 some more first. There's already some duplication of Ignition code and there's opportunity for more sharing if we want to support directories and symlinks.

The main difference is that Ignition only has an "update" mode whereas the MCD has both a "check" and an "update" mode. Although a "check" mode might be of interest to Ignition as well to be used as a final pass to confirm file states match the config?

Having overlap is expected. Though I am all for the ability to share some functionality so we don't have to redevelop all required features as time goes on.

Did you find a use case that requires directories and links already? Or is this more so anticipating (correctly) that eventually we will need to support them?

Did you find a use case that requires directories and links already? Or is this more so anticipating (correctly) that eventually we will need to support them?

Yeah, more so anticipating the need!

In that case I agree, implementing (or updating) similar logic in ignition in a way that will let us import and reuse is a better use of time as we don't have a need ASAP.

Hmm, should we discuss whether we want this in 4.0? It's basic functionality that one would expect we'd support.

Hmm, should we discuss whether we want this in 4.0? It's basic functionality that one would expect we'd support.

I would like to be able to lay down symbolic links as part of the work I'm doing for kmods-via-containers. I agree that directories and symbolic links are items that users would expect to work.

bump

does anybody remember why we didn't add support for directories and symlinks when the MCO was created? I vaguely remember some issues (esp around symlinks) but other than that I'm under the impression that we just didn't add a reconcile for dirs/symlinks just because there wasn't a need? Maybe it has something to do with how spec2 handles them (not sure)

I believe there wasn't a need and the previous work which the MCO was built upon didn't have dirs/links implemented either.

I would also be interested in this feature, atm short of creating directories via systemd units, I'm a bit blocked in rolling out some customizations. What's needed to raise the priority on this? More people upvoting? It really seems like basic functionality to be able to create directories via MachineConfig.

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

/lifecycle frozen

@jlebon what's the status of this issue? I keep running into situations in which I just want to create a directory, but instead I have to find some weird workaround (e.g., right now I'm installing a bunch files into /etc/mco as a staging location, because I couldn't create a more appropriate directory).

@larsks It's still outstanding, but eventually will be fixed by openshift/enhancements#1032.