kernelkit / infix

Linux :yellow_heart: NETCONF = Infix
https://kernelkit.org
GNU General Public License v2.0
52 stars 12 forks source link

Container environment variables do not bite in container #822

Open troglobit opened 2 days ago

troglobit commented 2 days ago

Current Behavior

When first adding environment variables to a container they show up:

admin@infix:/> configure 
admin@infix:/config/> edit container system 
admin@infix:/config/container/system/> set env FOO value bar
admin@infix:/config/container/system/> leave
admin@infix:/> container shell system 
root@sys0:/# set |grep FOO
FOO='bar'
root@sys0:/# 

However, changing the environment, or adding a new variable, does not "take" unless the container upgrade command is run:

admin@infix:/> configure 
admin@infix:/config/> set container system env FOO value "grok it"
admin@infix:/config/> leave
admin@infix:/> container shell system 
root@sys0:/# set |grep FOO
FOO='bar'
root@sys0:/# 
admin@infix:/> 
admin@infix:/> container upgrade system 
>> Stopping ... system
>> Trying to pull ghcr.io/kernelkit/curios:edge...
Getting image source signatures
Copying blob 15adbdbf57fc skipped: already exists  
Copying config 49639ab9de done  
Writing manifest to image destination
Storing signatures
49639ab9de610f4046b154d4d6313d7111f7d1f61f6efd5221a8f55b708c537d
>> Starting system ...
e2cadcd09f98a505056adf240d58e8f7b0becb6e116f727e81179c7ce88e668e
>> Done.
admin@infix:/> container shell system 
root@sys0:/# set |grep FOO
FOO='grok it'
root@sys0:/# 

Expected Behavior

Changes to a container's configuration should always be applied, and other changes to Infix running-config should not affect an already running container.

Steps To Reproduce

see above

Additional information

No response