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

59 Коммитов

Автор SHA1 Сообщение Дата
frank-pang-msft e5522df90c
Record app health heartbeat + default ExtensionEvent OperationId to VMWatchCohortId (#93)
Record app health heartbeat every 5 mins + default ExtensionEvent OperationId to VMWatchCohortId if VMWatchSettings specifies it in EnvironmentAttributes.
2024-11-19 17:39:02 -08:00
Kevin Lugo 3ec3e5b906
Refactoring Telemetry Package and replacing go-kit Logger for Slog Logger (#88)
This Pull Request refactors the usage of our Telemetry package and
changes the logger from gokit logger. These changes close the gap on the
difference between the v2 in the master branch and the consolidated code
base in the feature/v2/WindowsMigration.
 
 
Important changes: 
- Created new Slog Handler to change the msg tag to event and moved it
to the end of the log message.
- The new Telemetry struct is now a singleton instead of a global
function.

### AI Updates:

------------------------------------------------------------------------------------

Updates to Telemetry:

*
[`internal/telemetry/telemetry.go`](diffhunk://#diff-03a209e90e40142dadb464e0a169c11dae5605db9eaf53106cdac0c56c235b38L4-R21):
The telemetry package was updated with several changes. The `EventLevel`
and `EventTask` constants were renamed for clarity, and the
`TelemetryEventSender` struct was replaced with a `Telemetry` struct.
Several methods were also changed, and new error variables were
introduced for better error handling.
[[1]](diffhunk://#diff-03a209e90e40142dadb464e0a169c11dae5605db9eaf53106cdac0c56c235b38L4-R21)
[[2]](diffhunk://#diff-03a209e90e40142dadb464e0a169c11dae5605db9eaf53106cdac0c56c235b38L34-R121)

*
[`main/cmds.go`](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373R5-R16):
The logging in the `main/cmds.go` file was updated to use the `slog`
package instead of the `log` package. This included changing the type of
the `lg` variable in several functions and updating the telemetry calls
to use the new `SendEvent` method from the updated `telemetry` package.
[[1]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373R5-R16)
[[2]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L44-R68)
[[3]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L80-R88)
[[4]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L108-R115)
[[5]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L137-R142)
[[6]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L173-R173)
[[7]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L182-R202)
[[8]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L225-R225)
[[9]](diffhunk://#diff-ace417b47e816a44cf3b6f6248e72453a46d9e6043f19aea9d39212e852cc373L238-R238)

Updates to Logging:

*
[`main/handlersettings.go`](diffhunk://#diff-f8ae33e4c69620dbc2523794f5240aa34ad618e11e155fec37c03a0c2e8b2b8cR6-L11):
The logging in the `handlersettings.go` file was updated to use the
`slog` package instead of the `log` package. This included updating the
telemetry calls to use the new `SendEvent` method from the updated
`telemetry` package.
[[1]](diffhunk://#diff-f8ae33e4c69620dbc2523794f5240aa34ad618e11e155fec37c03a0c2e8b2b8cR6-L11)
[[2]](diffhunk://#diff-f8ae33e4c69620dbc2523794f5240aa34ad618e11e155fec37c03a0c2e8b2b8cL139-R162)

*
[`main/health.go`](diffhunk://#diff-2422cb6e5f570a2a3eeb5388f7e0fcc644727dfd0d34911de35e83a268f1d2efR8):
The logging in the `health.go` file was updated to use the `slog`
package instead of the `log` package. This included updating the
`evaluate` method in the `HealthProbe` interface.
[[1]](diffhunk://#diff-2422cb6e5f570a2a3eeb5388f7e0fcc644727dfd0d34911de35e83a268f1d2efR8)
[[2]](diffhunk://#diff-2422cb6e5f570a2a3eeb5388f7e0fcc644727dfd0d34911de35e83a268f1d2efL16)
[[3]](diffhunk://#diff-2422cb6e5f570a2a3eeb5388f7e0fcc644727dfd0d34911de35e83a268f1d2efL63-R63)

Addition of a new devcontainer run configuration:

*
[`.vscode/launch.json`](diffhunk://#diff-bd5430ee7c51dc892a67b3f2829d1f5b6d223f0fd48b82322cfd45baf9f5e945R18-R29):
A new devcontainer run configuration named "devcontainer run -
uninstall" was added. This configuration is set up to run the
"uninstall" command in the `applicationhealth-extension` program.
2024-07-01 20:47:09 -07:00
Kevin Lugo cf66d11186
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-27 18:13:21 -07:00
frank-pang-msft aefdba0144
Improve logging to kusto for better debugging (#77)
Some info is missing in the kusto logs that are present in the local
logs that makes it difficult to debug.

- Log specific command being executed at startup
(install/enable/update/etc)
- Include extension sequence number and pid at startup for debugging
from GuestAgent logs when extension logs are missing or seqNum.status
file is missing
- Log overall status file so we have better debugging when
VMExtensionProvisioning fails. This status is only sent when extension
transitions between Transitioning -> Success/Error or whenever extension
starts up.
- Update azure-extension-platform package to pull in change to increase
precision of event timestamp to include milliseconds/nanoseconds,
Previously it was RFC3339, which is in format yyyy-mm-ddThh:mm:ssZ,
which causes issue in sorting timestamps.
https://github.com/Azure/azure-extension-platform/pull/34
2024-05-21 15:02:52 -07:00
Dave Poole 03446f89ac feedback 2024-05-15 22:05:44 +00:00
Dave Poole c079e29fa1 revert accidental new variable creation 2024-05-14 22:53:17 +00:00
Dave Poole 486672beba preserving the original logic 2024-05-14 21:34:36 +00:00
Dave Poole 89379ba69c fix accidental edit 2024-05-14 21:12:19 +00:00
Dave Poole c84eb7be8d fix error check 2024-05-14 13:22:48 -07:00
Dave Poole c7b28f08d5 fix(cgroups): Fixing the check for systemd-run
Although the tests have been passing on the latest changes, there was a failure in testing last night.

When investigating I found the cause of the problem.  When you call cmd.Execute("systemd-run") golang will (sometimes) replace it with the full path (in this case /usr/bin/systemd-run) and so our check for systemd-run mode was not working and it was going down the old code path of direct cgroup assignment.

Fixing by being explicit about it and returning a boolean indicating whether resource governance is required after the process is launched.  This brings it back to the way it was in the previous PR iterations but avoids the objections raised there due to linux only concepts.  When we converge the windows code here, the implementation of applyResourceGovernance will use Job objects on windows and the code flow will be the same.
2024-05-14 12:37:10 -07:00
Dave Poole 5b29a32e8f feedback 2024-05-06 10:44:02 -07:00
Dave Poole f9ff9c5cea Change the commandline used for systemd-run depeding on the installed version
We found when testing on some ditros that they had older versions of systemd installed.

Versions before 246 use `MemoryLimit` and after that use `MemoryMax` so we need to know which version we have when constructing the commandline.

Also older versions didn't support the `-E` flag for environment variables and instead use the longer form `--setenv`.  This same flag is supported in both old and new versions
2024-05-06 09:51:49 -07:00
Kevin Lugo 62799315b6
Removing Unnecessary Telemetry Events and Log CustomMetrics Changes only (#68)
* Removed Noise Telemetry Events, and more details on error log.

* - Created new CustomMetricsStatusType
- CustomMetrics will know be reported only when there is a Change in the CustomMetric Field.
- Added commitedCustomMetricsState variable to keep track of the last CustomMetric Value.
2024-05-03 16:24:36 -07:00
Kevin Lugo b56f2ad074
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-01 23:46:04 -07:00
Dave Poole b30ee9181a feedback 2024-04-24 11:37:57 -07:00
Dave Poole 0c9a693cc7 feedback 2024-04-24 11:04:11 -07:00
Dave Poole e4c00e98d7 feedback 2024-04-23 19:54:35 +00:00
Dave Poole 8dae5e7377 Switch to use systemd-run to launch vmwatch
Background:

Our tests have been running fine for a long time but suddenly started failing on specific os versions.  This was because the process (although initially associated with the correct cgroup that we created) gets moved back to the parent cgroup.  This results in the limits being removed.

I did some research and reached out to various people and found that this is something that has previously been seen.  When a process is started with systemd you are not supposed to manage cgroups directly, systemd owns its own hierarchy and can manipulate things within it.  Documentation says that you should not modify the cgroups within that slice hierarchy directly but instead you should use `systemd-run` to launch processes.

The GuestAgent folks saw very similar behavior and switching to systemd-run resolved all their issues.

Changes:

Changed the code to run using `systemd-run` to launch the vmwatch process.  Using the `--scope` parameter results in the call to wait until the vmwatch process completes.

The process id returned from the call is the actual process id of vmwatch.

I have confirmed that killing vmwatch and killing app health extension still has the same behavior (the PDeathSig integration is working fine) and the aurora tests are working fine with these changes.

NOTE: Because in docker containers, systemd-run is not available, the code falls back to run the process directly and continues to use the old code path in that case.  This should also cover and linux distros which don't use systemd where direct cgroup assignment should work fine.
2024-04-22 10:02:51 -07:00
Kevin Lugo 3ae2bd3f80
Fixing bug to successfully kill AppHealth Gracefully & VMWatch. (#59)
Changes by @dpoole73 
- Fix bug where we were not using the global `vmWatchCommand` variable so the SIGTERM handler was not killing anything
- set the `Pdealthsig` property on the command so the SIGTERM signal is sent to the sub process on parent process termination

This fixes both issues:

Before the fix if we killed app health process, vmwatch process was always leaked

After the fix:
`kill <pid>` -> log message "Received shutdown request" and kill vmwatch.
`kill -9 <pid>`-> no log message, vmwatch is killed

Changes by @klugorosado 
- Added Integration tests to kill AppHealth Gracefully with SIGTERM and SIGINT, and validated VMWatch Shutdown. 
- Added Integration tests to kill AppHealth Forcibly with SIGKILL, and validated VMWatch Shutdown. 
- Added the capability for dev containers to run Integration tests inside.
2024-03-19 12:06:04 -07:00
Dave Poole d6fedcb57e feedback 2024-02-09 20:27:26 +00:00
Dave Poole a537451ab1 clean up logic a bit 2024-02-09 11:06:03 -08:00
Dave Poole cba77e8a06 Configurable rg settings
tweaking settings based on findings in sql vms
2024-02-08 15:54:59 -08:00
Kevin Lugo 1f5e41b085
Passing Extension Version to VMWatch (#52)
* Added --apphealth-version flag to VMWatch with AppHealth version from manifest.xml

* - Validated Extension Version on existing VMWatch.
- Created bash function to extract Version from manifest.xml.
- GetExtensionManifestVersion now first attempts to get Extension Version from Version passed at build time and uses manifest.xml file as fallback.
2024-01-18 14:02:30 -08:00
Manish Satwani 87048b99a3 added asserts on enabled and globalConfigUrl 2024-01-10 22:09:02 +00:00
Manish Satwani 48c44fce7b Adding test case unmarshal public settings 2024-01-10 20:33:32 +00:00
Manish Satwani 3900799438 removing type from tag, unmarshal is failing otherwise 2024-01-10 19:06:10 +00:00
Manish Satwani 0bda3000f2
Merge branch 'feature/v2/bootstrapVMWatch' into feature/v2/bootstrapVMWatch 2024-01-08 15:30:11 -08:00
Manish Satwani 5794e7b42f added parameters to schema 2024-01-08 15:01:27 -08:00
Mingyang Zheng 5d53e50b14 Add debug flag when running vmwatch 2024-01-04 15:55:22 -08:00
Manish Satwani 03813f38ac adding more properties to pass down to vmwatch 2024-01-04 11:48:57 -08:00
dpoole73 ee2640aba7
cgroup fixes (#47)
* Initial checkpoint

* tweak tests

* tweak the scripts

1. use nc for a tco server instead of web server for simplicity
2. add the variables to control tolerating the failure assignment to cgroup to allow tests to run
3. add new test for the case where it fails

* feedback

* feedback

* feeback

* feedback
2024-01-03 11:49:46 -08:00
dpoole73 7d3df06186
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-11-30 18:38:07 -08:00
frank-pang-msft 463490dafe
Bump to v2.0.8: Bootstrap VMWatch Process if vmWatchSettings present (#33)
## Overview
This PR contains changes to support running VMWatch (amd64 and arm64) as an executable via goroutines and channels. 
> VMWatch is a standardized, lightweight, and open-sourced testing framework designed to enhance the monitoring and management of guest VMs on the Azure platform, including both 1P and 3P instances. VMWatch is engineered to collect vital health signals across multiple dimensions, which will be seamlessly integrated into Azure's quality systems. By leveraging these signals, VMWatch will enable Azure to swiftly detect and prevent regressions induced by platform updates or configuration changes, identify gaps in platform telemetry, and ultimately improve the guest experience for all Azure customers.

## Behavior
VMWatch will run asynchronously as a separate process than ApplicationHealth, so the probing of application health will not be affected by the state of VMWatch. Depending on extension settings, VMWatch can be enabled/disabled, and also specify the test names and parameter overrides to VMWatch binary. The status of VMWatch will be displayed in the extension x.status files and also in GET VM Instance View. Main process will attempt to start VMWatch binary up to 3 times, after which VMWatch status will be set to failed.

## Process Leaks
To ensure that VMWatch processes do not accumulate, applicationhealth-shim will be responsible for killing existing VMWatch processes by looking for processes running with the VMWatch binary names according to the architecture type. For unexpected process termination, if for some reason the main applicationhealth-extension process is terminated, we also ensure that the VMWatch process is also killed by subscribing to shutdown/termination signals in the main process, and killing the VMWatch based off process ID.

## Example Binary Execution
Example execution from integration testing 
`
SIGNAL_FOLDER=/var/log/azure/Microsoft.ManagedServices.ApplicationHealthLinux/events VERBOSE_LOG_FILE_FULL_PATH=/var/log/azure/Microsoft.ManagedServices.ApplicationHealthLinux/VE.RS.ION/vmwatch.log ./var/lib/waagent/Extension/bin/VMWatch/vmwatch_linux_amd64 --config /var/lib/waagent/Extension/bin/VMWatch/vmwatch.conf --input-filter disk_io:outbound_connectivity
`

## Release/Packaging
In addition to the arm64 or amd64 VMWatch binaries, `vmwatch.conf` will be expected to be present in the bin/VMWatch directory for VMWatch process to read. VMWatch will also be populating and sharing eventsFolder with ApplicationHealth, so events can be viewed in Kusto. The verbose logs of VMWatch will be written to `vmwatch.log`.

---------

Co-authored-by: klugorosado <142627157+klugorosado@users.noreply.github.com>
2023-11-17 08:25:58 -08:00
klugorosado 2e8fd9e0fe
App Health Extension v2: Added Support TLS 1.3, added Parallel test execution and updated GitHub Workflow. (#38)
* - Added min and max TLS version support.
- Included Support for TLS 1.3
- Minimum  TLS 1.1 enforced.

* - Added bash function to create and delete certificates.
- Modified run.sh script to use the create and delete certificate functions.
- Added new instructions to run integration tests in README.md

* - Added 3 Integration tests to test each version of TLS.
- Added tlsVersion flag for webserver input.
- Added TLS Config for https webserver.
- Added helper functions to get TLS Version and Health State.
- Changed port of https server from 443 to 4430.

* - refactored NewHttpHealthProbe function.

* - changed min version to TLS 1.0

* - Test all TLS versions, including SSLv3
- Parallelize integration tests.

* - modified go.yml to use run.sh

* - Changes Flag to securityProtocol and updated Comments.

* -Added dynamic container names to bats tests.

* - TLS Config set to Defaults but tested.

* cleanup logic for created container.

* Only basic.bats tests are ran sequentially

* Only basic.bats tests are ran sequentially

* Attempt to fix go.yml

* Revert: TLS Config set to Defaults but tested

* TLS Max Version set to Default.

* Added small comments and verbose logs for integration tests.

* Try fix go workflow

* Update github workflow for v2/main and v2/develop.

* Try Add sequential and parallel integration tests with retry option.

* Try Fix: "Try Add sequential and parallel integration tests with retry option."

* Try Fix: "Try Fix: "Try Add sequential and parallel integration tests with retry option.""

* Update branch names in go.yml workflow

* Refactor health probe address construction

* Add While loop to finf unique docker image and Added Clarification comments.

* Refactor integration test job names

* capture error from run.sh script

* Fixed repeated Assertions on SSLv3 test

* Refactor health test function names and added new tests to validate request path.

* Remove unnecessary code in health.go

* nit changes to getHealthStatus

* Refactor integration test scripts for better
organization and parallelization

* Fix github workflow integration test directory paths.

* Update branch restrictions for push and
pull_request workflows
2023-11-15 17:31:45 -08:00
klugorosado ad2e94e8dd
App Health Extension v2: Increase maximum grace period to 4 hours. (#36)
* - change publicSettingsSchema.properties.gracePeriod to 14400 seconds.

* - Added a new unit test for the grace period (tested multiple scenarios).

* - Attempted to fix docker installation error in go workflow.
2023-09-05 11:28:31 -07:00
klugorosado 31d41d597e
Fix go workflow, updated test dockerfile to use ubuntu 20.04, and fix failing integration tests (#35)
* - Fixed "meta: can start the test container" Integration Test.
* - fixed bug with ubuntu-18.04.
- fixed handler-commands-install Integration Test.
- modified start_container function.
2023-08-23 15:21:23 -07:00
frank-pang-msft bbc0bc557b
Increase max settle time to 240 seconds (#29)
Increase max settle time 120 -> 240 seconds.
Update unit test for scenario for trying to have total settle time of 180 -> 300 should result in error
2022-10-27 13:05:53 -07:00
Bhaskar Brahma c6bd5c829e
Migrated to golang modules (#28)
Due to pending update of Compute-ART-LinuxExtensions go lang compiler to 1.17.x. I am migrating the code to use go modules.

https://go.dev/blog/migrating-to-go-modules

The vendor directory has been trimmed by running 'go mod init', 'go mod vendor' 'go mod tidy', no files were removed manually.

main.go has been updated to call the renamed method in github.com/Azure/azure-docker-extension/pkg/vmextension

* go mod vendor
* Ran go mod tidy and updated main.go
2022-10-10 10:16:38 -07:00
frank-pang-msft f93b4b7e24
Update first substatus item to be exactly formatted as V1 Extension (#26)
Update first substatus item to be exactly formatted as V1 Extension
2022-08-31 18:50:01 -07:00
frank-pang-msft 840303b90c
Bump to v2.0.3: Make first substatus backwards compatible with HostGAPlugin (#25)
* Make first substatus backwards compatible with HostGA by dedicating first substatus for health store
2022-08-26 15:17:51 -07:00
frank-pang-msft 25656fbbce
Allow endpoint to return custom metrics as a raw json string (#21)
Allow endpoint to return custom metrics as a raw json string
2022-08-22 12:04:21 -07:00
frank-pang-msft fb53d5cf13
Remove additionalProperties and separate into new substatus (#20)
Remove additionalProperties from substatus and separate into new substatus item since linux guest agent filters unrecognized properties.
2022-08-12 11:01:24 -07:00
frank-pang-msft 577e2736d4
Add support for new health states (#13)
Add support for new health states
2022-07-14 08:33:38 -07:00
Carl Chuahuico 841d2a2ca5 address pr comment 2020-09-21 13:20:39 -07:00
Carl Chuahuico 2b97f7e03e address pr comment 2020-09-16 09:58:42 -07:00
Carl Chuahuico f4ed4a6e4f typo 2020-09-15 14:25:17 -07:00
Carl Chuahuico e72be27a38 address pr comments 2020-09-15 14:15:44 -07:00
Carl Chuahuico fdd024b413 fix variable anmes 2020-09-02 11:10:55 -07:00
Carl Chuahuico af46c48712 Add verification for timestamps 2020-08-28 17:41:48 -07:00
Carl Chuahuico 800ba83859 Initial test working 2020-08-26 21:34:05 -07:00