Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Jun 15, 2022
1 parent cd8ccf3 commit e1f2165
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 92 deletions.
79 changes: 0 additions & 79 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -176,85 +176,6 @@
- Update ack response schema and processing, add retrier for acks {pull}200[200]
- Enhance error messages and logs for process start {pull}225[225]
- Changed the default policy selection logic. When the agent has no policy id or name defined, it will fall back to defaults (defined by $FLEET_SERVER_POLICY_ID and $FLEET_DEFAULT_TOKEN_POLICY_NAME environment variables respectively). {issue}29774[29774] {pull}226[226]
- Fix rename *ConfigChange to *PolicyChange to align on changes in the UI. {pull-beats}20779[20779]
- Thread safe sorted set {pull-beats}21290[21290]
- Copy Action store on upgrade {pull-beats}21298[21298]
- Include inputs in action store actions {pull-beats}21298[21298]
- Fix issue where inputs without processors defined would panic {pull-beats}21628[21628]
- Prevent reporting ecs version twice {pull-beats}21616[21616]
- Partial extracted beat result in failure to spawn beat {issue-beats}21718[21718]
- Use symlink path for reexecutions {pull-beats}21835[21835]
- Use ML_SYSTEM to detect if agent is running as a service {pull-beats}21884[21884]
- Use local temp instead of system one {pull-beats}21883[21883]
- Rename monitoring index from `elastic.agent` to `elastic_agent` {pull-beats}21932[21932]
- Fix issue with named pipes on Windows 7 {pull-beats}21931[21931]
- Fix missing elastic_agent event data {pull-beats}21994[21994]
- Ensure shell wrapper path exists before writing wrapper on install {pull-beats}22144[22144]
- Fix deb/rpm packaging for Elastic Agent {pull-beats}22153[22153]
- Fix composable input processor promotion to fix duplicates {pull-beats}22344[22344]
- Fix sysv init files for deb/rpm installation {pull-beats}22543[22543]
- Fix shell wrapper for deb/rpm packaging {pull-beats}23038[23038]
- Fixed parsing of npipe URI {pull-beats}22978[22978]
- Select default agent policy if no enrollment token provided. {pull-beats}23973[23973]
- Remove artifacts on transient download errors {pull-beats}23235[23235]
- Support for linux/arm64 {pull-beats}23479[23479]
- Skip top level files when unziping archive during upgrade {pull-beats}23456[23456]
- Do not take ownership of Endpoint log path {pull-beats}23444[23444]
- Fixed fetching DBus service PID {pull-beats}23496[23496]
- Fix issue of missing log messages from filebeat monitor {pull-beats}23514[23514]
- Increase checkin grace period to 30 seconds {pull-beats}23568[23568]
- Fix libbeat from reporting back degraded on config update {pull-beats}23537[23537]
- Rewrite check if agent is running with admin rights on Windows {pull-beats}23970[23970]
- Fix issues with dynamic inputs and conditions {pull-beats}23886[23886]
- Fix bad substitution of API key. {pull-beats}24036[24036]
- Fix docker enrollment issue related to Fleet Server change. {pull-beats}24155[24155]
- Improve log on failure of Endpoint Security installation. {pull-beats}24429[24429]
- Verify communication to Kibana before updating Fleet client. {pull-beats}24489[24489]
- Fix nil pointer when null is generated as list item. {issue-beats}23734[23734]
- Add support for filestream input. {pull-beats}24820[24820]
- Add check for URL set when cert and cert key. {pull-beats}24904[24904]
- Fix install command for Fleet Server bootstrap, remove need for --enrollment-token when using --fleet-server {pull-beats}24981[24981]
- Respect host configuration for exposed processes endpoint {pull-beats}25114[25114]
- Set --inscure in container when FLEET_SERVER_ENABLE and FLEET_INSECURE set {pull-beats}25137[25137]
- Fixed: limit for retries to Kibana configurable {issue-beats}25063[25063]
- Fix issue with status and inspect inside of container {pull-beats}25204[25204]
- Remove FLEET_SERVER_POLICY_NAME env variable as it was not used {pull-beats}25149[25149]
- Reduce log level for listener cleanup to debug {pull-beats}25274
- Passing in policy id to container command works {pull-beats}25352[25352]
- Reduce log level for listener cleanup to debug {pull-beats}25274[25274]
- Delay the restart of application when a status report of failure is given {pull-beats}25339[25339]
- Don't log when upgrade capability doesn't apply {pull-beats}25386[25386]
- Fixed issue when unversioned home is set and invoked watcher failing with ENOENT {issue-beats}25371[25371]
- Fixed Elastic Agent: expecting Dict and received *transpiler.Key for '0' {issue-beats}24453[24453]
- Fix AckBatch to do nothing when no actions passed {pull-beats}25562[25562]
- Add error log entry when listener creation fails {issue-beats}23483[23482]
- Handle case where policy doesn't contain Fleet connection information {pull-beats}25707[25707]
- Fix fleet-server.yml spec to not overwrite existing keys {pull-beats}25741[25741]
- Agent sends wrong log level to Endpoint {issue-beats}25583[25583]
- Fix startup with failing configuration {pull-beats}26057[26057]
- Change timestamp in elatic-agent-json.log to use UTC {issue-beats}25391[25391]
- Fix add support for Logstash output. {pull-beats}24305[24305]
- Do not log Elasticsearch configuration for monitoring output when running with debug. {pull-beats}26583[26583]
- Fix issue where proxy enrollment options broke enrollment command. {pull-beats}26749[26749]
- Remove symlink.prev from previously failed upgrade {pull-beats}26785[26785]
- Fix apm-server supported outputs not being in sync with supported output types. {pull-beats}26885[26885]
- Set permissions during installation {pull-beats}26665[26665]
- Disable monitoring during fleet-server bootstrapping. {pull-beats}27222[27222]
- Fix issue with atomic extract running in K8s {pull-beats}27396[27396]
- Fix issue with install directory in state path in K8s {pull-beats}27396[27396]
- Disable monitoring during fleet-server bootstrapping. {pull-beats}27222[27222]
- Change output.elasticsearch.proxy_disabled flag to output.elasticsearch.proxy_disable so fleet uses it. {issue-beats}27670[27670] {pull-beats}27671[27671]
- Add validation for certificate flags to ensure they are absolute paths. {pull-beats}27779[27779]
- Migrate state on upgrade {pull-beats}27825[27825]
- Add "_monitoring" suffix to monitoring instance names to remove ambiguity with the status command. {issue-beats}25449[25449]
- Ignore ErrNotExists when fixing permissions. {issue-beats}27836[27836] {pull-beats}27846[27846]
- Snapshot artifact lookup will use agent.download proxy settings. {issue-beats}27903[27903] {pull-beats}27904[27904]
- Fix lazy acker to only add new actions to the batch. {pull-beats}27981[27981]
- Allow HTTP metrics to run in bootstrap mode. Add ability to adjust timeouts for Fleet Server. {pull-beats}28260[28260]
- Fix agent configuration overwritten by default fleet config. {pull-beats}29297[29297]
- Allow agent containers to use basic auth to create a service token. {pull-beats}29651[29651]
- Fix issue where a failing artifact verification does not remove the bad artifact. {pull-beats}30281[30281]
- Reduce Elastic Agent shut down time by stopping processes concurrently {pull-beats}29650[29650]
- Move `context cancelled` error from fleet gateway into debug level. {pull}187[187]
- Update library containerd to 1.5.10. {pull}186[186]
- Add fleet-server to output of elastic-agent inspect output command (and diagnostic bundle). {pull}243[243]
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/agent/application/pipeline/emitter/emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func New(ctx context.Context, log *logger.Logger, agentInfo *info.AgentInfo, con
if err != nil {
return nil, errors.New(err, "failed to start composable controller")
}

return func(ctx context.Context, c *config.Config) (err error) {
span, ctx := apm.StartSpan(ctx, "update", "app.internal")
defer func() {
Expand Down
5 changes: 3 additions & 2 deletions internal/pkg/agent/application/pipeline/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ func (r *router) Route(ctx context.Context, id string, grpProg map[pipeline.Rout
for _, rk := range s.Keys() {
active[rk] = true

// Are we already runnings this streams?
// When it doesn't exist we just create it, if it already exist we forward the configuration.
// Are we already running's this streams?
// When it doesn't exist we just create it, if it already exists we
// forward the configuration.
p, ok := r.routes.Get(rk)
var err error
if !ok {
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/agent/stateresolver/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func converge(s state, cfg cfgReq) (state, []configrequest.Step) {
}
}

// What need to be started or updated.
// What needs to be started or updated.
for _, p := range cfg.Programs() {
a, found := s.Active[p.Identifier()]
if !found {
Expand Down Expand Up @@ -161,7 +161,7 @@ func converge(s state, cfg cfgReq) (state, []configrequest.Step) {
}
}

// What need to be updated.
// What needs to be updated.
return newState, steps
}

Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/agent/stateresolver/stateresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/elastic/elastic-agent/pkg/core/logger"
)

// Acker allow to ack the should state from a converge operation.
// Acker allow to ack the state from a converge operation.
type Acker func()

// StateResolver is a resolver of a config state change
Expand Down Expand Up @@ -52,7 +52,7 @@ func (s *StateResolver) Resolve(
s.l.Debugf("step %d: %s", i, step.String())
}

// Allow the operator to ack the should state when applying the steps is done correctly.
// Allow the operator to ack the state when applying the steps is done correctly.
ack := func() {
s.ack(newState)
}
Expand Down
7 changes: 0 additions & 7 deletions internal/pkg/core/plugin/process/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,22 +290,15 @@ func (a *Application) gracefulKill(proc *process.Info) {
a.logger.Errorf("failed to stop %s: %v", a.Name(), err)
}

var wg sync.WaitGroup
doneChan := make(chan struct{})
wg.Add(1)
go func() {
wg.Done()

if _, err := proc.Process.Wait(); err != nil {
// process is not a child - some OSs requires process to be child
a.externalProcess(proc.Process)
}
close(doneChan)
}()

// wait for awaiter
wg.Wait()

// kill in case it's still running after timeout
t := time.NewTimer(procExitTimeout)
defer t.Stop()
Expand Down

0 comments on commit e1f2165

Please sign in to comment.