Closed dch closed 11 months ago
I think patching PATH_DI_CONFIG=/etc/cloud/ds-identify.cfg is the simplest change.
yes, but also, this is related to https://github.com/canonical/cloud-init/issues/4180
to generalise: unlike the python code, we currently have no method of relocating paths in our shell code.
(not that I've dared to try and relocate /run
in the python code yet to /var/run
. at least the tools exist already. but i can't tell how consistently they are used until i try to do it)
Then perhaps judicious use of %%LOCALBASE%% and %%PREFIX%% in the port may be the best approach, at leeast initially.
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274260 for work-around for FreeBSD ports.
here's my attempt at fixing it: https://github.com/canonical/cloud-init/pull/4485
Bug report
ds-identify doesn't look in
/usr/local/etc/cloud/
but only in/etc/cloud/
, which is in conflict with all the other cloud-init tools on FreeBSD, and probably the other BSDs.In particular, ds-identify looks in
/etc/cloud/cloud.cfg
to find things likedatasource_list: ...
but these files live in/usr/local/etc/cloud/...
on FreeBSD, and possibly other BSDs.This then likely breaks cloudinit for anybody using a non-OpenStack config, as the DataSource will be overridden.
Steps to reproduce the problem
env DI_LOG=stderr /usr/local/lib/cloud/ds-identify --force
PATH_ETC_CLOUD="/usr/local/etc/cloud"
default with path hack
Environment details
logs without
/etc/cloud/ds-identify.cfg