mozilla / mig

Distributed & real time digital forensics at the speed of the cloud

Home Page:http://mig.mozilla.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mig-loader overwrites /etc/mig/mig-agent.cfg

gene1wood opened this issue · comments

Each time mig-loader runs, which on my system is via cron every 2 hours, it overwrites /etc/mig/mig-agent.cfg reverting any changes I make.

This makes the config file somewhat useless. In my case I was trying to change the logging verbosity from the default of debug but my change gets reverted every 2 hours.

# /sbin/mig-loader
logging routine started
Ident is Ubuntu 14.04 trusty
Init is upstart
leaving findOSInfo()
Found local address 10.251.30.240/21
Found local address 10.251.25.173/21
Found local address 172.20.20.35/24
Found local address 2xxxxxxxxxxxxa/64
Found local address 2xxxxxxxxxxxd/64
Found local address fxxxxxxxxxxxd/64
leaving initAgentID()
Trying proxy from environment otherwise direct connection for public IP retrieval
Found public ip 6xxxxxxxxxxx8
initialized local bundle information
mig-agent /sbin/mig-agent -> ff4d1888db4644aa5b17155d2929892f20a6f7156381fd874c24d29e0651371b
mig-loader /sbin/mig-loader -> 42a5e8e69e9ffec66008391cd5a345503f4f8a871f8038c1c89389f59307ca32
configuration /etc/mig/mig-agent.cfg -> 8d4267b759d58674dd90d662b3eb259f413a728b2ce768374ca63d966570af49
agentcert /etc/mig/agent.crt -> 9b7812c7fd9b54009921cbffaef5043ef9c5a9b5c847e6d8afc58dca5088c5a2
agentkey /etc/mig/agent.key -> 13da4bffd75291d073b3d03bb317bca67ddf81334b19d095839e0b4e8dd72965
cacert /etc/mig/ca.crt -> 11b9ea222437ab35e6fb33801aeba635056ae6207452905a98b541c1fdc57651
requesting manifest from https://api.mig.mozilla.org/api/v1/manifest/agent/
2 valid signatures in manifest
comparing mig-agent /sbin/mig-agent
we have ff4d1888db4644aa5b17155d2929892f20a6f7156381fd874c24d29e0651371b
they have ff4d1888db4644aa5b17155d2929892f20a6f7156381fd874c24d29e0651371b
we have correct file, no need to replace
comparing mig-loader /sbin/mig-loader
we have 42a5e8e69e9ffec66008391cd5a345503f4f8a871f8038c1c89389f59307ca32
they have 42a5e8e69e9ffec66008391cd5a345503f4f8a871f8038c1c89389f59307ca32
we have correct file, no need to replace
comparing configuration /etc/mig/mig-agent.cfg
we have 8d4267b759d58674dd90d662b3eb259f413a728b2ce768374ca63d966570af49
they have 4d1a613f0d3b1955af4e83c7d19b7547caab14c4def137a02c04236c524357f3
refreshing configuration
fetching file from https://api.mig.mozilla.org/api/v1/manifest/fetch/
validating staged file signature
renaming existing file
installing staged file
comparing agentcert /etc/mig/agent.crt
we have 9b7812c7fd9b54009921cbffaef5043ef9c5a9b5c847e6d8afc58dca5088c5a2
they have 9b7812c7fd9b54009921cbffaef5043ef9c5a9b5c847e6d8afc58dca5088c5a2
we have correct file, no need to replace
comparing agentkey /etc/mig/agent.key
we have 13da4bffd75291d073b3d03bb317bca67ddf81334b19d095839e0b4e8dd72965
they have 13da4bffd75291d073b3d03bb317bca67ddf81334b19d095839e0b4e8dd72965
we have correct file, no need to replace
comparing cacert /etc/mig/ca.crt
we have 11b9ea222437ab35e6fb33801aeba635056ae6207452905a98b541c1fdc57651
they have 11b9ea222437ab35e6fb33801aeba635056ae6207452905a98b541c1fdc57651
we have correct file, no need to replace
running triggers due to modification

The config file is intended to be managed by mig-loader. We make sure the config file matches what is in the manifest, so we can push updates to the configuration files out too when we need to. Users running an agent managed by mig-loader cannot modify the config file in a persistent way.