Marc Olivier Bergeron
27870526d1
Added a few more environment variables. PATHEXT and COMPUTERNAME were needed for 'shutdown.exe'. Meanwhile, I've connected as SYSTEM with PsExec to show the environment variables by default and added them.
...
Signed-off-by: Marc Olivier Bergeron <mbergeron28@proton.me >
2026-01-12 11:58:14 -05:00
Mujib Ahasan
6fc75dc1e3
incus-agent: Add feature checks
...
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com >
2025-12-19 03:04:28 -05:00
Mujib Ahasan
2f7b4cb99d
incus-agent: Add system configuration support
...
Closes #2684
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com >
2025-12-19 03:01:35 -05:00
Mujib Ahasan
2557ab37bb
incus-agent: Add OS config path
...
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com >
2025-12-19 02:12:30 -05:00
Stéphane Graber
a9cab98afc
incus-agent: Code cleanup
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-12-19 01:52:27 -05:00
Marc Olivier Bergeron
656392fa5d
Attempt to make the Incus Agent on Windows better integrated.
...
Signed-off-by: Marc Olivier Bergeron <mbergeron28@proton.me >
2025-12-12 00:02:14 -05:00
Marc Olivier Bergeron
7d017f58c1
Added new Windows environment variable 'SystemDrive'
...
Signed-off-by: Marc Olivier Bergeron <mbergeron28@proton.me >
2025-12-04 16:46:20 -05:00
Marc Olivier Bergeron
73749572d7
Added default environment variables for the Windows agent.
...
Signed-off-by: Marc Olivier Bergeron <mbergeron28@proton.me >
2025-11-29 23:16:12 -05:00
Stéphane Graber
895feb456e
incus-agent: Fix gofumpt
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-11-19 14:14:41 -05:00
Stéphane Graber
09e0f36dd5
Merge pull request #2671 from MOBergeron/windows-agent
...
Support for the Incus Agent as a Service on Windows
2025-11-18 23:54:36 -05:00
Marc Olivier Bergeron
221cddae4c
Added Windows agent install scripts.
...
Signed-off-by: Marc Olivier Bergeron <mbergeron28@proton.me >
2025-11-18 09:00:41 -05:00
Olivier Lechevalier
fff9f9a0b8
cmd/incus-agent: silence warning about break in select in execWs.Do
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 03:00:00 -05:00
Olivier Lechevalier
33aadce7b7
cmd/incus-agent: address if flow in Connect
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 02:59:59 -05:00
Olivier Lechevalier
31357237cb
cmd/incus-agent: silence defer being use in loop
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 02:52:32 -05:00
Olivier Lechevalier
2728ff641a
cmd/incus-agent: refactor DevIncusAPIGET to use switch
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 02:52:31 -05:00
Olivier Lechevalier
4cd768c211
cmd/incus-agent: address os.Exit being called outside of main and init
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 02:52:31 -05:00
Olivier Lechevalier
1d6de25bae
cmd/incus-agent: address import shadowing
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-17 00:03:06 -05:00
Olivier Lechevalier
41465dab36
cmd/incus-agent: address errcheck lint issue
...
Signed-off-by: Olivier Lechevalier <olivier.lechevalier@gmail.com >
2025-11-16 23:59:10 -05:00
Benjamin Somers
206d63486e
incus-agent/darwin: Fix typo in comment
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-19 21:31:02 +00:00
Benjamin Somers
105325bc58
incus-agent/darwin: Implement interactive console
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-19 20:29:40 +00:00
Benjamin Somers
73fd2abeda
incus-agent/windows: Feature parity with Darwin
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-16 01:50:05 +00:00
Benjamin Somers
8692de14f2
incus-agent/darwin: Split non-darwin-specific logic
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-16 01:50:01 +00:00
Benjamin Somers
e27fae43e6
agent/darwin: Initial darwin agent implementation
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-10 15:52:07 +00:00
Benjamin Somers
a3f8d7321f
incus-agent: Pass more information to osUmount
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-10-09 21:05:59 +00:00
Benjamin Somers
28855b3765
incus-agent: Remove dual mount type handling
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-08-08 21:12:12 +00:00
Benjamin Somers
0a8ba04990
incus-agent/events: Remove fmt import
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-07-31 09:07:54 +00:00
Benjamin Somers
457e09d906
incus-agent: Handle path mount removal
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr >
2025-07-31 09:06:24 +00:00
0xk1f0
0c5d8f90cc
cmd/incus_agent: Replace gorilla/mux with http.ServeMux
...
Signed-off-by: 0xk1f0 <dev@k1f0.dev >
2025-07-07 17:30:12 +02:00
Nathan Chase
e0ab377353
incus-agent: Don't needlessly use format string functions
...
Signed-off-by: Nathan Chase <ntc477@utexas.edu >
2025-05-23 01:41:07 -04:00
JUN JIE NAN
71454862c1
incus-agent: Simplify code by using modern constructs
...
Using more modern features of Go, such as:
- conditional assignment -> built-in min or max in go1.21,
- sort.Slice -> slices.Sort in go1.21,
- loop assign map -> maps.Copy in go1.21,
- []byte(fmt.Sprintf...) -> fmt.Appendf(nil,...) in go1.19,
- strings.HasPrefix / strings.TrimPrefix -> strings.CutPrefix in go1.20
Signed-off-by: JUN JIE NAN <nanjunjie@gmail.com >
2025-05-17 12:24:01 -04:00
Stéphane Graber
a0984bcabb
incus-agent: Skip /dev/incus on Windows
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-05-09 18:34:46 -04:00
karo
63386dd065
cmd/incus-agent: rename variable mux to router so it does not collide with the package of the same name
...
Signed-off-by: karo <karolin.kostial@gmail.com >
2025-04-30 17:53:00 +02:00
Stéphane Graber
5b6f213009
incus-agent: Add initial Windows support
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-28 00:57:43 -04:00
Stéphane Graber
b4d33b1205
incus-agent/exec: Move away from os.File
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-28 00:05:12 -04:00
Stéphane Graber
2c0baecffa
incus-agent: Reduce code duplication
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-28 00:05:11 -04:00
Stéphane Graber
d9458b78c1
incus-agent: Set base directory
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-28 00:05:10 -04:00
Stéphane Graber
6e22aa905f
incus-agent: Split OS specific logic
...
This moves all OS specific logic to a new os_OSNAME.go file.
It also introduces a basic placeholder for Windows, allowing the agent
to be built on Windows, even if most features will return "Not implemented"
at this stage.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-28 00:05:09 -04:00
karo
9100f23fca
incus-agent: Rename reverters from revert to reverter
...
Signed-off-by: karo <karolin.kostial@gmail.com >
2025-04-27 04:27:44 -04:00
Stéphane Graber
db29bd7aa8
Limit new() calls
...
Be more explicit about variable types.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-24 00:49:56 -04:00
JUN JIE NAN
349272181b
Fix reference passing when yaml unmarshal
...
For example:
metadata := new(api.ImageMetadata) // type: *api.ImageMetadata
err = yaml.Unmarshal(content, &metadata)
It works on `yaml.v2` and `yaml.v3` but not work under `goccy/go-yaml`, and
`goccy/go-yaml` behavior is correct. So fixed it and add test cases to pretect.
Signed-off-by: JUN JIE NAN <nanjunjie@gmail.com >
2025-04-24 00:40:13 -04:00
Stéphane Graber
b718c9348c
incus-agent: Retry mounts to avoid kernel races
...
Closes #1881
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-04-04 16:26:03 -04:00
Stéphane Graber
2224fff715
incus-agent: Update for osarch change
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-19 02:15:55 -04:00
Stéphane Graber
c8a75b2861
incus-agent: Fix gofumpt
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-17 18:02:02 -04:00
Stéphane Graber
ecca140124
incus-agent: Improve SFTP performance
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2025-03-14 15:33:20 -04:00
Stéphane Graber
6a0bcd76ec
global: Initial goimports run
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
2024-11-19 17:32:18 +00:00
Stéphane Graber
94cc8d6d3d
incus-agent: Use NetlinkInterfaces
...
Fetching addresses for a single interface in Go is terribly slow, use a
bulk query method.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
Sponsored-by: https://webdock.io
2024-11-12 08:52:02 -05:00
Mathias Gibbens
1d8f4e73ab
shared: Update import path for "revert" library
...
Signed-off-by: Mathias Gibbens <mathias.gibbens@futurfusion.io >
2024-10-21 13:45:08 -06:00
Stéphane Graber
14bc011916
incus-agent: Add timeout for DNS query
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org >
Sponsored-by: https://webdock.io
2024-10-16 23:47:43 -04:00
Mathias Gibbens
f6b5daff87
cmd/incus-agent: Populate OS information when returning instance state
...
Signed-off-by: Mathias Gibbens <mathias.gibbens@futurfusion.io >
2024-09-24 08:05:38 -06:00
Mathias Gibbens
ebed9bb00c
cleanup: Replace use of os.IsNotExist(err) with errors.Is(err, fs.ErrNotExist)
...
Signed-off-by: Mathias Gibbens <mathias.gibbens@futurfusion.io >
2024-09-23 10:44:05 -06:00