Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Conversation

@arithx
Copy link
Contributor

@arithx arithx commented Aug 3, 2017

@dghubble
Copy link
Member

dghubble commented Aug 3, 2017

Commented on the upstream issue. I'm for "fixing" this issue by removing the feature rather than expanding it further. coreos/bugs#2085 (comment)

@arithx
Copy link
Contributor Author

arithx commented Aug 3, 2017

Closing

@arithx arithx closed this Aug 3, 2017
@dghubble
Copy link
Member

dghubble commented Aug 3, 2017

Oh, I mean, this is the fix technically. So awesome that you've added it, thanks.

I'd like to see what @dgonyeo thinks about the idea of dropping the feature since he's the maintainer.

@dghubble dghubble reopened this Aug 3, 2017
@cgonyeo
Copy link
Contributor

cgonyeo commented Aug 7, 2017

One issue with dropping this feature and just making sure the docs are good is that in the etcd and flannel sections the user lacks enough control over the generated unit to actually use coreos-metadata without this feature.

Unless we're also talking about dropping the etcd and flannel sections, I'd prefer to keep this feature in, or at least come up with some alternative way for users to use coreos-metadata results in those sections.

@dghubble
Copy link
Member

dghubble commented Aug 7, 2017

In what way is writing the unit directly not plausible? I haven't needed the dynamic data feature in my experience running clusters across clouds and bare-metal, but maybe there is a case I haven't hit.

@crawford
Copy link
Contributor

crawford commented Aug 7, 2017

the etcd and flannel sections the user lacks enough control

We should fix this instead.

@cgonyeo
Copy link
Contributor

cgonyeo commented Aug 7, 2017

@crawford think it would be reasonable for ct to allow users to add arbitrary things to the produced units for etcd and flannel, and to remove the dynamic data feature then?

One thing to note is that this would result in users needing separate configs for each provider a user wishes to use, since coreos-metadata produces provider-specific environment variables.

@dghubble
Copy link
Member

dghubble commented Aug 7, 2017

Ok, admittedly I don't use the special etcd and flannel sections so perhaps they're useful to some cases / people?

@crawford
Copy link
Contributor

crawford commented Aug 8, 2017

One thing to note is that this would result in users needing separate configs for each provider a user wishes to use, since coreos-metadata produces provider-specific environment variables.

This is one of the main reasons we created CT. I don't think it makes sense to remove this feature and ask users to write separate configs for each platform.

return out, report.Report{}, ast
}
unit.Contents = strings.Join(contents, "\n")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If templating is used, the units must also have:

Requires=coreos-metadata.service
After=coreos-metadata.service
EnvironmentFile=/run/metadata/coreos

Here's where these lines are added for the generated units:

out.Unit.Add("Requires=coreos-metadata.service")

Unfortunately users may have added these lines themselves to their units, so you should probably check for those. Maybe modify types/util/UnitSection.Add to check for preexisting matching keys, and to blow them away before appending the new value.

@dghubble
Copy link
Member

dghubble commented Aug 8, 2017

@crawford If it's a goal for CT to abstract away cases where a user would reference cloud-provider specific variables, dynamic data should support systemd units (per initial issue) and also dropins. This expands the scope and I tend to think its not worthwhile, but that's my opinion. If we continue with it, we should think about aliasing the other cloud-provider specific variables - as soon as I try to use the 2nd NIC, the current abstraction doesn't work and I have to write the systemd unit directly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants