Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
Aaron Meihm dfceec521e [minor] remove agt serviceInstall flag and add agent check in loader
Remove the service install flag to the agent as it's not really
neccessary; the standard daemon invocation will achieve the same result.

Also add a check in loader runs to see if the agent is running even if
no changes were needed. If not, try to start the agent. This handles
cases where the loader doesnt need to make changes, but the agent is not
running for some reason, and prior the loader would not attempt to
recover this scenario.
2016-03-24 17:08:14 -05:00
Aaron Meihm 3e7ba217b6 [minor/bug] if Init fails, ensure valid log channel exists before use
If Init returns an error because it cannot initialize the log, this
fixes an issue where a channel write will be attempted causing the agent
to block indefinitely
2016-03-24 17:08:14 -05:00
Aaron Meihm e66dc8d0b3 [minor] migrate darwin specific environment calls for agentcontext 2016-03-24 17:08:14 -05:00
Aaron Meihm 7c897edc06 [major] Initial code for mig-loader
Checkpoint commit for initial revision of mig-loader related code. This
change adds functionality supporting agent auto-update using manifests
stored in the API.
2016-03-24 17:08:13 -05:00
Aaron Meihm 853d722a83 [medium] introduce optional action compression between client and agent 2016-01-22 10:33:52 -06:00
Aaron Meihm e4a12050c8 [minor] remove aws component from env struct members 2015-12-30 09:36:37 -06:00
Aaron Meihm 828fb3af66 [minor] log metadata service response code on failure 2015-12-30 09:36:37 -06:00
Aaron Meihm c012a58fb5 [minor] store AWS agent environment in separate struct 2015-12-30 09:36:37 -06:00
Aaron Meihm f893afd6e0 [medium] Support fetch of instance meta-data for agents running in AWS 2015-12-30 09:36:37 -06:00
Julien Vehent 98590eba5e [medium] Force max exec time for agent in checkin mode, fixes #148 2015-11-04 11:07:27 -05:00
Aaron Meihm 15abdedc49 [minor/bug] fix module parameter input issues
This resolves a bug introduced in e2e687f. The args parameter to
runModuleDirectly() used to contain input parameters, but as of recent
changes to allow parameters via stdin does not.

Since the parameter was unused, this changes it to be an interface
pointer. If set, this will be used as module parameters, if not the
agent modules will expect input via stdin as normal.
2015-11-03 12:18:08 -06:00
Marco Vanotti e2e687f9a1 [minor] Add travis-ci test for running agent from file.
I'm applying the changes suggested in PR #139 by @jvehent; these make
runModuleDurectly to not use stdin, instead only use the given
parameters.

Now travis-ci should test mig-agent after installing to see that it can
run an action individually.
2015-10-28 16:49:42 -03:00
Marco Vanotti 78867ae5bb [minor] fix debug logging in mig-agent
Move the "debug-mode" switch to after loading the mig configuration,
because loading the configuration overrides the LOGGINGCONF variable.
2015-10-28 16:13:43 -03:00
Marco Vanotti e780f7151f [minor] move run action from file logic into it's own function.
To make the code more easy to follow, I moved the logic for
loading/running an action from a file into it's own function
"loadActionFromFile"
2015-10-28 16:13:43 -03:00
Julien Vehent 3cfb4a4220 [minor] fix agent local conf warning message 2015-10-19 08:03:55 -04:00
Julien Vehent 39d78e1995 Merge pull request #138 from mvanotti/fixConfigLoad
[minor] fix configLoad bug in mig-agent
2015-10-18 09:07:21 -04:00
Marco Vanotti d23927487c [minor] fix configLoad bug in mig-agent
If an error ocurred during configLoad function, it might not use the
builtin conf, but a half-overwritten one. This change defers the
Config overwrite until all the error-sensitive functions are called.
2015-10-17 15:10:36 -03:00
Marco Vanotti 263b5dd605 [minor] panic on agent init err if foreground mode
The comment said "if in foreground mode, don't retry, just panic", but
fhe if condition only checked for debug, no foreground.
debug -> foreground, but you can run the mig agent in foreground without
debug mode.
2015-10-17 15:06:17 -03:00
Marco Vanotti ad4abd7a6d [minor] fix permissions bug on receiveModuleResults in mig-agent
There was an ioutil.WriteFile whose permissions were not in octal, giving
the resulting file bad permissions.

This commit also changes some of the printf formats from '%s' to %q,
which already quotes the desired variable.
2015-10-17 13:11:47 -03:00
Julien Vehent 76f33f2dea [minor] Add base Version in MIG package, overrided by Makefile 2015-09-24 08:54:07 -04:00
Julien Vehent f9c24e9828 [minor] change folder structure to go get with nice names 2015-08-26 12:22:02 -04:00