136 Commits
Author SHA1 Message Date
dependabot[bot]andNikolay Edigaryev c70eb068d4 Bump go.opentelemetry.io/otel/sdk/metric from 1.27.0 to 1.34.0 (#257)
* Bump go.opentelemetry.io/otel/sdk/metric from 1.27.0 to 1.34.0

Bumps [go.opentelemetry.io/otel/sdk/metric](https://github.com/open-telemetry/opentelemetry-go) from 1.27.0 to 1.34.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.27.0...v1.34.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk/metric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* opentelemetry: add TestConfigure

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
0.28.2
2025-02-20 02:19:11 +04:00
dependabot[bot] adc77bc0f4 Bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0 (#254)
Bumps [github.com/hashicorp/go-version](https://github.com/hashicorp/go-version) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/hashicorp/go-version/releases)
- [Changelog](https://github.com/hashicorp/go-version/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-version/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-version
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 02:03:50 +04:00
Nikolay Edigaryev 818f4288c2 Controller API: correctly detect WebSocket closure in Watch RPC (#259) 2025-02-20 02:00:57 +04:00
dependabot[bot] 2dfdb40dea Bump golang.org/x/net from 0.28.0 to 0.35.0 (#255)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.28.0 to 0.35.0.
- [Commits](https://github.com/golang/net/compare/v0.28.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 01:59:40 +04:00
dependabot[bot] e6fdf98db3 Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#256)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 01:32:26 +04:00
dependabot[bot] 9f2be01a3e Bump golang.org/x/crypto from 0.26.0 to 0.33.0 (#258)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.33.0.
- [Commits](https://github.com/golang/crypto/compare/v0.26.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 01:32:00 +04:00
Nikolay Edigaryev 11afe5863b Enable Dependabot version updates (#253) 2025-02-19 19:37:06 +04:00
Nikolay Edigaryev 2c8d36ef70 Always randomize MAC address (#251)
* Always randomize MAC address

* Worker: check DHCP lease time and print a warning if it's unconfigured

* Further improve the explanation

* Add two leases example to the explanation

* Add an example of the resulting /var/db/dhcpd_leases
0.28.1
2025-02-13 12:35:12 +00:00
Nikolay Edigaryev 2aae818f78 Worker: prefer assigned CPU/memory to CPU/memory (#250)
* Worker: prefer assigned CPU/memory to CPU/memory

* orchard get worker: show default CPU, default memory and labels
2025-02-13 16:23:47 +04:00
Nikolay Edigaryev ee3c0f91f2 Startup script: implement retries for connection-related operations (#249)
* Startup script: implement retries for connection-related operations

* assert.Equal → assert.Contains

* Wait for at least 1,000 lines of logs

* Join slice of strings before calling assert.Contains()

* TestHostDirs: use require.Contains() instead of require.EqualValues()

* TestHostDirs: wait for at least 4 log lines
0.28.0
2025-02-12 18:11:12 +04:00
Nikolay Edigaryev 4794f2a5b6 orchard create vm: introduce --random-serial command-line argument (#248) 2025-02-12 18:00:13 +04:00
Nikolay Edigaryev 61d7d34ea4 RPC v2: fix Ping() hanging due to PONG not being processed (#247) 0.27.1 2025-02-07 22:05:09 +04:00
Nikolay Edigaryev 8dd74db446 Worker notification improvements (#246)
* OpenAPI: document all default "wait" values

* Re-use waitContext instead of instantiating it anew
0.27.0
2025-02-07 00:38:04 +04:00
Nikolay Edigaryev 722d5a8eaf Avoid including " and $ characters in bootstrap admin's token (#245)
* Avoid including " and $ characters in bootstrap admin's token

* Avoid fallthrough
2025-02-06 21:37:42 +04:00
Fedor Korotkov 86f0afb5a3 Small timout for worker notification (#242)
* Small timout for worker notification

It seems at the moment if a worker re-establishes notify stream (for example, if network flips or proxy breaks the connection) then we can see "no worker registered with this name" errors.

This change makes Notifier to wait for 30 seconds before failing, at the time of calling `Notifier#Notify` we know such worker exists.

PS not sure if we need to make the timeout configurable.

* Wait via context

* Make sure all `context`s for `Notify` is time bounded

* Lint issues
2025-02-06 17:30:09 +00:00
Nikolay Edigaryev 26c8808506 Support scheduling by labels (#244) 2025-02-06 18:05:36 +04:00
Nikolay Edigaryev 581de320b9 Allow creating VMs with implicit CPU and memory (#243)
* Allow creating VMs with implicit CPU and memory

* Clarify why cpu/memory can be 0 a bit better

* Controller(API): don't forget to update DefaultCPU and DefaultMemory

* Add an integration test for implicit CPU and memory
2025-02-06 00:50:01 +04:00
dependabot[bot] 6b3d64be96 Bump github.com/golang/glog from 1.2.0 to 1.2.4 (#241)
Bumps [github.com/golang/glog](https://github.com/golang/glog) from 1.2.0 to 1.2.4.
- [Release notes](https://github.com/golang/glog/releases)
- [Commits](https://github.com/golang/glog/compare/v1.2.0...v1.2.4)

---
updated-dependencies:
- dependency-name: github.com/golang/glog
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 17:34:23 +04:00
Nikolay Edigaryev 88fba8004d Introduce WebSocket-based RPC v2 (#239)
* Introduce WebSocket-based RPC v2

* go test: add -ldflags="-B gobuildid"

* No need to change the "controller.workerNotifier.Notify()" error message

* No need to modify Protocol Buffers/gRPC generated code

* rpcWatch(): explain that connection shouldn't be normally be closed

* Avoid "port forwarding failed: " repetition in error messages

* Improve comments and avoid repetition in IP resolution errors
2025-01-30 17:33:32 +04:00
Nikolay Edigaryev 077252f6d4 Prevent goroutine leak when Close()'ing *grpc_net_conn.Conn (#237) 0.26.4 2025-01-23 18:17:14 +04:00
Nikolay Edigaryev 1fce915d67 API: only overwrite specific worker fields when worker already exists (#236)
* API: only overwrite specific worker fields when worker already exists

* Don't forget to return when creating new worker

* Return updated worker when updating the worker
0.26.3
2025-01-16 16:42:17 +04:00
Nikolay Edigaryev 08769e00b4 Worker: do not consider on-disk VMs syncing error as fatal (#230) 0.26.2 2024-12-11 19:56:00 +04:00
Nikolay Edigaryev d7b6f477e1 Never list workers in Update()/storeUpdate() transactions (#228)
* POST /v1/workers: do not list workers in a single update txn

* schedulingLoopIteration(): do not list workers in a single update txn

* .golangci.yml: remove mentions of fully deprecated linters
0.26.1
2024-12-05 16:59:50 +04:00
Nikolay Edigaryev d94690176e Schedule opportunistically and more granularly (#225)
* Schedule opportunistically and more granularly

To avoid transaction conflicts.

* Measure scheduling loop iteration duration and log it at debugging level

* Use "continue NextWorker" instead of just "continue" for clarity
0.26.0
2024-12-03 14:11:48 +00:00
Nikolay Edigaryev 7fe0414981 "--scheduler-profile" option to allow different orchestration patterns (#224)
* "--scheduler-profile" option to allow different orchestration patterns

* API(cluster settings): provide a default value for scheduler profile
2024-11-28 20:07:46 +04:00
Tim PeetersandNikolay Edigaryev 4c63cea062 Fix #221 by bumping Go. (#223)
* Fix #221 by bumping Go.

* CI: use golang:latest instead of GoReleaser's container image

* Add Go linker flag (-B gobuildid) to generate UUID.

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
0.25.2
2024-11-20 14:02:39 +04:00
Nikolay Edigaryev 772336a7bd Scheduler: stop iterating over workers when candidate worker is found (#220) 0.25.1 2024-11-13 17:59:08 +04:00
Nikolay Edigaryev 60948e14fe Rendezvous: use a buffered channel of size 1 (#219)
* Rendezvous: use a buffered channel of size 1

* Fix spelling of "absence" in comment
2024-11-08 11:19:54 +04:00
Nikolay Edigaryev d66d667f1e orchard ssh vm: fix "The handle is invalid." error on Windows (#217) 0.25.0 2024-11-01 16:35:01 -04:00
Nikolay Edigaryev 9da91fa21a Use a separate lock file on Windows to protect configuration (#216) 2024-11-01 22:38:25 +04:00
Fedor Korotkov e40ce6d999 Build Windows binaries (#215)
* Build client for Windows

* Dry Run
2024-11-01 14:33:34 -04:00
Nikolay Edigaryev 79213fccfe Fix OpenAPI spec errors reported by Swagger Editor (#213) 2024-11-01 02:20:04 +04:00
Fedor Korotkov b6fe371416 allow to set up worker name (#210) 0.24.1 2024-10-11 07:44:01 -04:00
Nikolay Edigaryev 2a2ddea62a Controller: emit lifecycle events when the VM gets restarted or deleted (#208)
* Controller: emit lifecycle events when the VM gets restarted or deleted

* vm_{scheduling,run}_time → vm_{scheduling,run}_duration for clarity

* Update VM endpoint: only update VM started time when zero
0.24.0
2024-09-24 17:53:10 +04:00
Nikolay Edigaryev 1730eaf67c orchard controller: make sure that output goes through the logger (#207)
...which emits JSON on the production for easier processing.
2024-09-17 22:54:43 +04:00
Mark McWhirter 979af1f699 Expose 2 new metrics about worker health (#203)
* Expose more metrics about worker health

* PR feedback

* PR feedback
0.23.2
2024-09-10 10:13:41 -04:00
Nikolay Edigaryev cbda1a0c87 Dockerfile: fix "orchard" binary destination path 0.23.1 2024-09-06 13:39:04 +04:00
Nikolay Edigaryev 4d49051478 .cirrus.yml: don't forget the FURY_TOKEN in "Release Binaries" task 0.23.0 2024-09-05 21:57:07 +04:00
Nikolay Edigaryev 32f2d17c13 Dockerfile: use goreleaser/goreleaser-pro to support "furies:" 2024-09-05 21:56:50 +04:00
Nikolay Edigaryev c61c1861d9 .cirrus.yml: Use GoReleaser Pro 2024-09-05 21:00:34 +04:00
Nikolay Edigaryev c92016a804 orchard-controller .deb/.rpm package: install systemd service (#204)
And create/delete the "orchard-controller" system user for
running the Orchard Controller.
2024-09-05 20:42:36 +04:00
Nikolay Edigaryev 72c6bbffa0 Move documentation to Tart's website (#199) 2024-09-03 21:08:11 +04:00
Nikolay Edigaryev 8aaf05c4f7 controller run: make bootstrap process more user-friendly (#201)
* controller run: make bootstrap process more user-friendly

* Badger: log to zap instead of standard error
2024-09-03 18:54:28 +04:00
Nikolay Edigaryev b8bc62cf28 .goreleaser.yml: publish .deb and .rpm packages to Fury.io (#200) 2024-08-27 17:32:58 +04:00
Nikolay Edigaryev cd9794197b API: update service account fields on PUT (#198)
* API: update service account fields on PUT

* Disable G115 integer overflow linter of gosec
0.22.1
2024-08-21 20:03:52 +04:00
dependabot[bot] 1bb00534f5 Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#192)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-18 10:25:26 -04:00
Nikolay Edigaryev eecf61f714 .cirrus.yml: specify resources required on the "dev-mini" (#194) 2024-07-16 16:18:49 +04:00
Nikolay Edigaryev 0fd17db586 Document standard options of ingesting metrics into GCP (#193)
* Document standard options of ingesting metrics into GCP

* Remove "the"
2024-07-11 16:51:25 +04:00
Nikolay Edigaryev 4df43e6432 Default ?wait= to 0 seconds (#190) 0.22.0 2024-07-03 23:07:14 +04:00
Nikolay Edigaryev 76f192bdb0 API endpoint and associated RPC changes to resolve VMs IP's (#188)
* API endpoint and associated RPC changes to resolve VMs IP's

* Fix "Missing expected argument '<name>'" error when doing "tart set"

* Implement TestIPEndpoint() and IP() method in controller HTTP client
2024-07-03 22:56:43 +04:00