applicationhealth-extension.../go.mod

37 строки
1.3 KiB
Modula-2
Исходник Постоянная ссылка Обычный вид История

Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
module github.com/Azure/applicationhealth-extension-linux
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
go 1.22
require (
github.com/Azure/azure-docker-extension v0.0.0-20160802215703-0dd2f199467d
github.com/Azure/azure-extension-platform v0.0.0-20240521173920-6b2acfda81e9
github.com/containerd/cgroups/v3 v3.0.2
Resource governance, heartbeat and dev container changes (#43) * Bootstrapping has no integration test regressions * Add cleanup of VMWatch process during shutdown signals and upon other commands, plus integration test template * Added integration tests for VMWatch * Linting * Fix file vet issues * attempt to fix handler command: install - creates the data dir * nit integration tests * Use handlerenvironment to dictate vmwatch signal folder and verbose log file paths * Include missing changes in previous commit * Remove unnecessary changes * Try to fix docker installation error in go workflow * Fix integration tests * Update HandlerManifest with process names for guest agent to monitor cpu/memory usage * Run linting * Remove cpu/memory limits in HandlerManifest + update VMWatch binary directory to bin/VMWatch/ + implement VMWatch process retries + update integration tests * Update test.Dockerfile * Rename workflow * Add formatting & linting * Add logic to do retries on failed tests + don't fail fast * Minor nits * Update integration tests + code changes to resolve comments regarding execution of process * Formatting + Linting + Vet * Add logic for recover and defer for executing VMWatch. Proper close and read of channel. Also only every 60 seconds * fix integration tests * Bump to v2.0.7 * revert unnecessary changes to schema.go * Small fix to killVMWatch * Fix logic for killing VMWatch * v2.0.8 Added Support for dynamic EventsFolder directory from extension Handler Environment (#39) * - moved handlerenv.go and seqno.go from "github.com/Azure/azure-docker-extension/pkg/vmextension" - Added EventsFolder with other missing parameters. * -removed vmextension lib dependency from VMwatch and other Files. - Updates HandlerEnviroment.json test file. - Updated VMwatch Integration Tests. * - Bump to v2.0.8 * initial devcontainer changes changes: 1. add devcontainer condig 2. add vscode build config 3. add makefile target to set up the appropriate stuff in the container 4. update some line endings and add gitattributes so script run 5. fix what seems to be a bug in fake-waagent script as it doesn't work without this fix for me * update binaries and config to latest * Resource governance, heartbeat and dev container changes The main feature change here is the addition of resource governance for linux via cgroups. We discover the current cgroup and add a sub cgroup for our purposes (limiting cpu to 1% and memory to 40MB) I also added support for detecting a stuck vmwatch using the heartbeat file and implemented the same logic for restarts from the windows version (3 restarts per 3 hours) As part of the development of this, I added support for devcontainer execution so we can step through the code from a dev machine into either a WSL session or a linux vm with tools installed. I added integration tests to check process exit, OOM and cpu throttling. These changes required a few changes to the makefile and scripts. I also updated the vmwatch binaries and added a script to download the latest ones as well I updated the govendor files using the tool it told me to run I hope I did this right * feedback * feedback * Run 'go mod edit -go=1.18 to be conistent with linux extensions repo * Run linting/formatting * Fix merge nits to merge conflicts * Fix app health handler.log directory path * Change to applicationhealth-extension * Mistakenly added two VMWatch substatus items * Adding filtering for tests which can only run on a real linux host (not WSL or docker) continuing investigation... * fix time from minutes to hours plus add makefile target to create zip file (for use in testing) * feedback * feedback * add readme * updated vmwatch version, config schema and commandline * typo * test fixes * test fixes * add helper script to upload binaries to storage * change container name * feedback * feedback * typo --------- Co-authored-by: Frank Pang <frankpang@microsoft.com> Co-authored-by: frank-pang-msft <92764154+frank-pang-msft@users.noreply.github.com> Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-12-01 05:38:07 +03:00
github.com/opencontainers/runtime-spec v1.0.2
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
github.com/pkg/errors v0.9.1
Resource governance, heartbeat and dev container changes (#43) * Bootstrapping has no integration test regressions * Add cleanup of VMWatch process during shutdown signals and upon other commands, plus integration test template * Added integration tests for VMWatch * Linting * Fix file vet issues * attempt to fix handler command: install - creates the data dir * nit integration tests * Use handlerenvironment to dictate vmwatch signal folder and verbose log file paths * Include missing changes in previous commit * Remove unnecessary changes * Try to fix docker installation error in go workflow * Fix integration tests * Update HandlerManifest with process names for guest agent to monitor cpu/memory usage * Run linting * Remove cpu/memory limits in HandlerManifest + update VMWatch binary directory to bin/VMWatch/ + implement VMWatch process retries + update integration tests * Update test.Dockerfile * Rename workflow * Add formatting & linting * Add logic to do retries on failed tests + don't fail fast * Minor nits * Update integration tests + code changes to resolve comments regarding execution of process * Formatting + Linting + Vet * Add logic for recover and defer for executing VMWatch. Proper close and read of channel. Also only every 60 seconds * fix integration tests * Bump to v2.0.7 * revert unnecessary changes to schema.go * Small fix to killVMWatch * Fix logic for killing VMWatch * v2.0.8 Added Support for dynamic EventsFolder directory from extension Handler Environment (#39) * - moved handlerenv.go and seqno.go from "github.com/Azure/azure-docker-extension/pkg/vmextension" - Added EventsFolder with other missing parameters. * -removed vmextension lib dependency from VMwatch and other Files. - Updates HandlerEnviroment.json test file. - Updated VMwatch Integration Tests. * - Bump to v2.0.8 * initial devcontainer changes changes: 1. add devcontainer condig 2. add vscode build config 3. add makefile target to set up the appropriate stuff in the container 4. update some line endings and add gitattributes so script run 5. fix what seems to be a bug in fake-waagent script as it doesn't work without this fix for me * update binaries and config to latest * Resource governance, heartbeat and dev container changes The main feature change here is the addition of resource governance for linux via cgroups. We discover the current cgroup and add a sub cgroup for our purposes (limiting cpu to 1% and memory to 40MB) I also added support for detecting a stuck vmwatch using the heartbeat file and implemented the same logic for restarts from the windows version (3 restarts per 3 hours) As part of the development of this, I added support for devcontainer execution so we can step through the code from a dev machine into either a WSL session or a linux vm with tools installed. I added integration tests to check process exit, OOM and cpu throttling. These changes required a few changes to the makefile and scripts. I also updated the vmwatch binaries and added a script to download the latest ones as well I updated the govendor files using the tool it told me to run I hope I did this right * feedback * feedback * Run 'go mod edit -go=1.18 to be conistent with linux extensions repo * Run linting/formatting * Fix merge nits to merge conflicts * Fix app health handler.log directory path * Change to applicationhealth-extension * Mistakenly added two VMWatch substatus items * Adding filtering for tests which can only run on a real linux host (not WSL or docker) continuing investigation... * fix time from minutes to hours plus add makefile target to create zip file (for use in testing) * feedback * feedback * add readme * updated vmwatch version, config schema and commandline * typo * test fixes * test fixes * add helper script to upload binaries to storage * change container name * feedback * feedback * typo --------- Co-authored-by: Frank Pang <frankpang@microsoft.com> Co-authored-by: frank-pang-msft <92764154+frank-pang-msft@users.noreply.github.com> Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-12-01 05:38:07 +03:00
github.com/stretchr/testify v1.8.0
github.com/xeipuuv/gojsonschema v0.0.0-20160623135812-c539bca196be
)
Implementing New Sequence Number Management and Fixing how we get the extension Sequence Number (#83) This pull request includes changes to the sequence number management and testing in the `main` and `internal/seqno` packages. The most important changes include the creation of a new `SequenceNumberManager` interface and `SeqNumManager` struct, the addition of a function to check if a sequence number has already been processed before enabling it, and the addition of tests for the new function. New sequence number management: * [`internal/seqno/seqno.go`](diffhunk://#diff-f671e4abbca7ae7b738bc8ef287fcbf3995062b2cc5e54ad666e3fa6f1b674dcR1-R101): Created a new `SequenceNumberManager` interface and `SeqNumManager` struct to manage sequence numbers. The `SeqNumManager` struct includes functions to get and set sequence numbers, and to find a sequence number from either the environment variable or the most recently used file under the config folder. Changes to `main` package: * [`main/cmds.go`](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L32-R32): a new function `enablePre` has been added. This function, acting as the PreFunc for the enable command, verifies if the sequence number is ready for processing by comparing it with the last executed number from the `mrseq` file. This ensures orderly processing of sequence numbers. * [`main/main.go`](diffhunk://#diff-327181d0a8c5e6b164561d7910f4eeffd41442d55b2a2788fda2aa2692f17ec0L64-R68): Replaced the `FindSeqNum` function with `seqnoManager.FindSeqNum` to find the sequence number. * [`main/seqnum.go`](diffhunk://#diff-171d8d31093fac5a89b9bbe034fe628faf47dd12fad91b3205433ca95c56be52L1-L32): Removed the `FindSeqNum` function as it has been replaced by `seqnoManager.FindSeqNum`. New tests: * [`main/cmds_test.go`](diffhunk://#diff-bdb35e68cc43b04f7c8b572233a1472169052b84e0b471c6fe578fe049784223R36-R133): Added tests for the enablePre. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-28 04:13:21 +03:00
require (
github.com/go-kit/log v0.2.0
go.uber.org/mock v0.4.0
)
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
require (
github.com/cilium/ebpf v0.9.1 // indirect
Resource governance, heartbeat and dev container changes (#43) * Bootstrapping has no integration test regressions * Add cleanup of VMWatch process during shutdown signals and upon other commands, plus integration test template * Added integration tests for VMWatch * Linting * Fix file vet issues * attempt to fix handler command: install - creates the data dir * nit integration tests * Use handlerenvironment to dictate vmwatch signal folder and verbose log file paths * Include missing changes in previous commit * Remove unnecessary changes * Try to fix docker installation error in go workflow * Fix integration tests * Update HandlerManifest with process names for guest agent to monitor cpu/memory usage * Run linting * Remove cpu/memory limits in HandlerManifest + update VMWatch binary directory to bin/VMWatch/ + implement VMWatch process retries + update integration tests * Update test.Dockerfile * Rename workflow * Add formatting & linting * Add logic to do retries on failed tests + don't fail fast * Minor nits * Update integration tests + code changes to resolve comments regarding execution of process * Formatting + Linting + Vet * Add logic for recover and defer for executing VMWatch. Proper close and read of channel. Also only every 60 seconds * fix integration tests * Bump to v2.0.7 * revert unnecessary changes to schema.go * Small fix to killVMWatch * Fix logic for killing VMWatch * v2.0.8 Added Support for dynamic EventsFolder directory from extension Handler Environment (#39) * - moved handlerenv.go and seqno.go from "github.com/Azure/azure-docker-extension/pkg/vmextension" - Added EventsFolder with other missing parameters. * -removed vmextension lib dependency from VMwatch and other Files. - Updates HandlerEnviroment.json test file. - Updated VMwatch Integration Tests. * - Bump to v2.0.8 * initial devcontainer changes changes: 1. add devcontainer condig 2. add vscode build config 3. add makefile target to set up the appropriate stuff in the container 4. update some line endings and add gitattributes so script run 5. fix what seems to be a bug in fake-waagent script as it doesn't work without this fix for me * update binaries and config to latest * Resource governance, heartbeat and dev container changes The main feature change here is the addition of resource governance for linux via cgroups. We discover the current cgroup and add a sub cgroup for our purposes (limiting cpu to 1% and memory to 40MB) I also added support for detecting a stuck vmwatch using the heartbeat file and implemented the same logic for restarts from the windows version (3 restarts per 3 hours) As part of the development of this, I added support for devcontainer execution so we can step through the code from a dev machine into either a WSL session or a linux vm with tools installed. I added integration tests to check process exit, OOM and cpu throttling. These changes required a few changes to the makefile and scripts. I also updated the vmwatch binaries and added a script to download the latest ones as well I updated the govendor files using the tool it told me to run I hope I did this right * feedback * feedback * Run 'go mod edit -go=1.18 to be conistent with linux extensions repo * Run linting/formatting * Fix merge nits to merge conflicts * Fix app health handler.log directory path * Change to applicationhealth-extension * Mistakenly added two VMWatch substatus items * Adding filtering for tests which can only run on a real linux host (not WSL or docker) continuing investigation... * fix time from minutes to hours plus add makefile target to create zip file (for use in testing) * feedback * feedback * add readme * updated vmwatch version, config schema and commandline * typo * test fixes * test fixes * add helper script to upload binaries to storage * change container name * feedback * feedback * typo --------- Co-authored-by: Frank Pang <frankpang@microsoft.com> Co-authored-by: frank-pang-msft <92764154+frank-pang-msft@users.noreply.github.com> Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-12-01 05:38:07 +03:00
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
github.com/go-logfmt/logfmt v0.5.1 // indirect
Resource governance, heartbeat and dev container changes (#43) * Bootstrapping has no integration test regressions * Add cleanup of VMWatch process during shutdown signals and upon other commands, plus integration test template * Added integration tests for VMWatch * Linting * Fix file vet issues * attempt to fix handler command: install - creates the data dir * nit integration tests * Use handlerenvironment to dictate vmwatch signal folder and verbose log file paths * Include missing changes in previous commit * Remove unnecessary changes * Try to fix docker installation error in go workflow * Fix integration tests * Update HandlerManifest with process names for guest agent to monitor cpu/memory usage * Run linting * Remove cpu/memory limits in HandlerManifest + update VMWatch binary directory to bin/VMWatch/ + implement VMWatch process retries + update integration tests * Update test.Dockerfile * Rename workflow * Add formatting & linting * Add logic to do retries on failed tests + don't fail fast * Minor nits * Update integration tests + code changes to resolve comments regarding execution of process * Formatting + Linting + Vet * Add logic for recover and defer for executing VMWatch. Proper close and read of channel. Also only every 60 seconds * fix integration tests * Bump to v2.0.7 * revert unnecessary changes to schema.go * Small fix to killVMWatch * Fix logic for killing VMWatch * v2.0.8 Added Support for dynamic EventsFolder directory from extension Handler Environment (#39) * - moved handlerenv.go and seqno.go from "github.com/Azure/azure-docker-extension/pkg/vmextension" - Added EventsFolder with other missing parameters. * -removed vmextension lib dependency from VMwatch and other Files. - Updates HandlerEnviroment.json test file. - Updated VMwatch Integration Tests. * - Bump to v2.0.8 * initial devcontainer changes changes: 1. add devcontainer condig 2. add vscode build config 3. add makefile target to set up the appropriate stuff in the container 4. update some line endings and add gitattributes so script run 5. fix what seems to be a bug in fake-waagent script as it doesn't work without this fix for me * update binaries and config to latest * Resource governance, heartbeat and dev container changes The main feature change here is the addition of resource governance for linux via cgroups. We discover the current cgroup and add a sub cgroup for our purposes (limiting cpu to 1% and memory to 40MB) I also added support for detecting a stuck vmwatch using the heartbeat file and implemented the same logic for restarts from the windows version (3 restarts per 3 hours) As part of the development of this, I added support for devcontainer execution so we can step through the code from a dev machine into either a WSL session or a linux vm with tools installed. I added integration tests to check process exit, OOM and cpu throttling. These changes required a few changes to the makefile and scripts. I also updated the vmwatch binaries and added a script to download the latest ones as well I updated the govendor files using the tool it told me to run I hope I did this right * feedback * feedback * Run 'go mod edit -go=1.18 to be conistent with linux extensions repo * Run linting/formatting * Fix merge nits to merge conflicts * Fix app health handler.log directory path * Change to applicationhealth-extension * Mistakenly added two VMWatch substatus items * Adding filtering for tests which can only run on a real linux host (not WSL or docker) continuing investigation... * fix time from minutes to hours plus add makefile target to create zip file (for use in testing) * feedback * feedback * add readme * updated vmwatch version, config schema and commandline * typo * test fixes * test fixes * add helper script to upload binaries to storage * change container name * feedback * feedback * typo --------- Co-authored-by: Frank Pang <frankpang@microsoft.com> Co-authored-by: frank-pang-msft <92764154+frank-pang-msft@users.noreply.github.com> Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-12-01 05:38:07 +03:00
github.com/godbus/dbus/v5 v5.0.4 // indirect
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) * Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-02 09:46:04 +03:00
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20151027082146-e0fe6f683076 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c // indirect
golang.org/x/sys v0.2.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Resource governance, heartbeat and dev container changes (#43) * Bootstrapping has no integration test regressions * Add cleanup of VMWatch process during shutdown signals and upon other commands, plus integration test template * Added integration tests for VMWatch * Linting * Fix file vet issues * attempt to fix handler command: install - creates the data dir * nit integration tests * Use handlerenvironment to dictate vmwatch signal folder and verbose log file paths * Include missing changes in previous commit * Remove unnecessary changes * Try to fix docker installation error in go workflow * Fix integration tests * Update HandlerManifest with process names for guest agent to monitor cpu/memory usage * Run linting * Remove cpu/memory limits in HandlerManifest + update VMWatch binary directory to bin/VMWatch/ + implement VMWatch process retries + update integration tests * Update test.Dockerfile * Rename workflow * Add formatting & linting * Add logic to do retries on failed tests + don't fail fast * Minor nits * Update integration tests + code changes to resolve comments regarding execution of process * Formatting + Linting + Vet * Add logic for recover and defer for executing VMWatch. Proper close and read of channel. Also only every 60 seconds * fix integration tests * Bump to v2.0.7 * revert unnecessary changes to schema.go * Small fix to killVMWatch * Fix logic for killing VMWatch * v2.0.8 Added Support for dynamic EventsFolder directory from extension Handler Environment (#39) * - moved handlerenv.go and seqno.go from "github.com/Azure/azure-docker-extension/pkg/vmextension" - Added EventsFolder with other missing parameters. * -removed vmextension lib dependency from VMwatch and other Files. - Updates HandlerEnviroment.json test file. - Updated VMwatch Integration Tests. * - Bump to v2.0.8 * initial devcontainer changes changes: 1. add devcontainer condig 2. add vscode build config 3. add makefile target to set up the appropriate stuff in the container 4. update some line endings and add gitattributes so script run 5. fix what seems to be a bug in fake-waagent script as it doesn't work without this fix for me * update binaries and config to latest * Resource governance, heartbeat and dev container changes The main feature change here is the addition of resource governance for linux via cgroups. We discover the current cgroup and add a sub cgroup for our purposes (limiting cpu to 1% and memory to 40MB) I also added support for detecting a stuck vmwatch using the heartbeat file and implemented the same logic for restarts from the windows version (3 restarts per 3 hours) As part of the development of this, I added support for devcontainer execution so we can step through the code from a dev machine into either a WSL session or a linux vm with tools installed. I added integration tests to check process exit, OOM and cpu throttling. These changes required a few changes to the makefile and scripts. I also updated the vmwatch binaries and added a script to download the latest ones as well I updated the govendor files using the tool it told me to run I hope I did this right * feedback * feedback * Run 'go mod edit -go=1.18 to be conistent with linux extensions repo * Run linting/formatting * Fix merge nits to merge conflicts * Fix app health handler.log directory path * Change to applicationhealth-extension * Mistakenly added two VMWatch substatus items * Adding filtering for tests which can only run on a real linux host (not WSL or docker) continuing investigation... * fix time from minutes to hours plus add makefile target to create zip file (for use in testing) * feedback * feedback * add readme * updated vmwatch version, config schema and commandline * typo * test fixes * test fixes * add helper script to upload binaries to storage * change container name * feedback * feedback * typo --------- Co-authored-by: Frank Pang <frankpang@microsoft.com> Co-authored-by: frank-pang-msft <92764154+frank-pang-msft@users.noreply.github.com> Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-12-01 05:38:07 +03:00
gopkg.in/yaml.v3 v3.0.1 // indirect
)