Comment 1 for bug 1814927

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

As jistr explained on IRC, "the reason was that in the config-data/foo there's a lot of files which we don't want copied into the containers. So we only look at files which changed in the duration of the puppet run, copy them into config-data/puppet-generated/foo and that then gets used for the containers."

But I hope we can *still* simplify that (and make the config dirs structure less confusing for users creating new templates of containerized services). For example, we could instead maintain full configuration of a service foo without the puppet-generated subset of it, under two paths named /var/lib/config-data/foo and /var/lib/config-data/foo.bak or *.1, or *.shadow. That would address the main issue: confusing paths to use for templates (https://review.openstack.org/#/c/634649/2..3/docker/services/database/mysql.yaml, right...). Assuming no one will use those .bak/.1/.shadow paths normally in templates or elsewhere, cuz that's internal needs only!

And then we could identify changed config files to be copied into containers by kolla extended start hook by simply running эdiff -nuaR /var/lib/config-data/foo /var/lib/config-data/foo.1 (or .bak/.shadow) or the like. And then calculating hash/crc for it just like we do currently by evaluating the "origin of time" mark, but using the diff outputs instead. I hope that could work as well.