| Files | Last commit | Last update |
|---|---|---|
csi: wait for the node plugin to come back after a restart (#3212) When the CSI node plugin restarts, any actor that suspends or resumes on that node during the restart crashes, because atelet can't unmount or mount its external volume. The actors stay crashed until `RevertActor`. Actors that keep running are not affected, since atelet only calls the node plugin on mount and unmount. I hit this while load testing with the R2 driver, where every actor on the node suspended during the 32 second restart. While the plugin restarts, its socket refuses connections. atelet tries once, gets `Unavailable`, and gives up. Now atelet waits up to 30 seconds for the plugin to come back. It uses the same `pluginsocket` code that atelet already uses to wait for the object store plugin. This only applies to the local socket. The controller plugin, which ateapi reaches over TCP, still fails right away. The new test starts a call while the plugin is down, then brings the plugin up. The test fails without this change. --------- Signed-off-by: Anish Gangu <anishgang@google.com> | 10 days ago | |
csi: wait for the node plugin to come back after a restart (#3212) When the CSI node plugin restarts, any actor that suspends or resumes on that node during the restart crashes, because atelet can't unmount or mount its external volume. The actors stay crashed until `RevertActor`. Actors that keep running are not affected, since atelet only calls the node plugin on mount and unmount. I hit this while load testing with the R2 driver, where every actor on the node suspended during the 32 second restart. While the plugin restarts, its socket refuses connections. atelet tries once, gets `Unavailable`, and gives up. Now atelet waits up to 30 seconds for the plugin to come back. It uses the same `pluginsocket` code that atelet already uses to wait for the object store plugin. This only applies to the local socket. The controller plugin, which ateapi reaches over TCP, still fails right away. The new test starts a call while the plugin is down, then brings the plugin up. The test fails without this change. --------- Signed-off-by: Anish Gangu <anishgang@google.com> | 10 days ago | |
Add volume snapshot support to volume plugins (#1849) ## Add volume snapshot support to volume plugins Part of #1951 This is the first PR in the external volume snapshot series. Tags will be able to snapshot an actor's external volumes and seed new actors from those snapshots. This PR adds only the volume plugin layer that work builds on. **There is no API change, and nothing calls the new snapshot methods yet.** ### What changes **Plugin interface** (`internal/volume/plugin.go`) - `CreateVolumeRequest` gains `SourceSnapshotID`, so a volume can be seeded from a snapshot. `CreateVolumeResponse` gains `ContentSourceSnapshotID`, the source the driver reports it actually restored from. - `VolumePluginControlPlane` gains `CreateSnapshot`, `GetSnapshot`, `DeleteSnapshot` and `ControllerCapabilities`, with the `CreateSnapshotRequest`, `Snapshot` and `Capabilities` types. **CSI plugin** (`internal/volume/csi`) - The snapshot methods are built on the controller's `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` RPCs. They use the controller capabilities the plugin already caches. `CreateSnapshot` and `GetSnapshot` drop a capability once the driver answers `Unimplemented` for it. - **`CreateSnapshot`** is refused without calling the driver if the driver lacks the capability. A response with no snapshot ID is an error. - **`GetSnapshot`** uses `ListSnapshots` filtered to one handle, because far more drivers implement it than the newer `GetSnapshot` RPC. An empty list or `NotFound` is reported as *not found*. A driver without `LIST_SNAPSHOTS`, or one that answers `Unimplemented`, returns an error wrapping `errors.ErrUnsupported`, so callers can tell a deleted snapshot from one the driver can't report on. An empty snapshot ID is rejected, so the driver is never asked for an unfiltered list. - **`DeleteSnapshot`** is always sent, even if the capability is missing, because skipping it would leak a handle the driver already issued. `NotFound` counts as success. An empty snapshot ID is rejected. - **Restores:** `CreateVolume` refuses a restore without calling the driver if it lacks `CREATE_DELETE_SNAPSHOT`. Otherwise it reads the content source from the driver's response. If the response reports no snapshot source ID, the plugin deletes the volume it just got and fails. Without this check, the caller would get back an empty volume without knowing it. If that delete fails, the error includes the volume ID but not the delete's gRPC code. `NotFound` from that delete counts as a successful cleanup, and `CreateVolume` still fails. Only presence is checked, not an exact ID match, because drivers may report the source in their own format (GCE PD reports a numeric snapshot ID). Kubernetes' external-provisioner checks the same way. **Mock plugin** - `MockVolumePlugin` implements the new methods. Its snapshots are always ready to use. ### Testing - New table tests in `plugin_snapshot_test.go` use the existing `mockCSIDriver`, which gains `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` hooks. They cover: - create, get and delete - capability caching, and dropping a capability after `Unimplemented` - refusing `CreateSnapshot` without the capability, and rejecting an empty snapshot ID from the driver - `GetSnapshot` not-found handling (empty list, `NotFound` from the driver), `ErrUnsupported` without `LIST_SNAPSHOTS` or after `Unimplemented`, and rejecting an empty ID - `DeleteSnapshot` error handling, sending it without the capability, and rejecting an empty ID - restore source checking: a missing source fails and deletes the volume, a failed delete reports the volume ID without its gRPC code, a delete answering `NotFound` is not reported, and a source in the driver's own format is accepted - refusing a restore on a driver without snapshot support - Existing CSI plugin tests pass unchanged. - `go test -race ./internal/volume/... ./cmd/ateapi/internal/controlapi` passes. I used an AI coding agent to help write and review this change, and reviewed the result myself. - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR -- Documentation will be added once all parts of the feature are implemented. --------- Signed-off-by: Sneha Aradhey <snehaaradhey@google.com> | 10 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 23 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 23 days ago | |
Add volume snapshot support to volume plugins (#1849) ## Add volume snapshot support to volume plugins Part of #1951 This is the first PR in the external volume snapshot series. Tags will be able to snapshot an actor's external volumes and seed new actors from those snapshots. This PR adds only the volume plugin layer that work builds on. **There is no API change, and nothing calls the new snapshot methods yet.** ### What changes **Plugin interface** (`internal/volume/plugin.go`) - `CreateVolumeRequest` gains `SourceSnapshotID`, so a volume can be seeded from a snapshot. `CreateVolumeResponse` gains `ContentSourceSnapshotID`, the source the driver reports it actually restored from. - `VolumePluginControlPlane` gains `CreateSnapshot`, `GetSnapshot`, `DeleteSnapshot` and `ControllerCapabilities`, with the `CreateSnapshotRequest`, `Snapshot` and `Capabilities` types. **CSI plugin** (`internal/volume/csi`) - The snapshot methods are built on the controller's `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` RPCs. They use the controller capabilities the plugin already caches. `CreateSnapshot` and `GetSnapshot` drop a capability once the driver answers `Unimplemented` for it. - **`CreateSnapshot`** is refused without calling the driver if the driver lacks the capability. A response with no snapshot ID is an error. - **`GetSnapshot`** uses `ListSnapshots` filtered to one handle, because far more drivers implement it than the newer `GetSnapshot` RPC. An empty list or `NotFound` is reported as *not found*. A driver without `LIST_SNAPSHOTS`, or one that answers `Unimplemented`, returns an error wrapping `errors.ErrUnsupported`, so callers can tell a deleted snapshot from one the driver can't report on. An empty snapshot ID is rejected, so the driver is never asked for an unfiltered list. - **`DeleteSnapshot`** is always sent, even if the capability is missing, because skipping it would leak a handle the driver already issued. `NotFound` counts as success. An empty snapshot ID is rejected. - **Restores:** `CreateVolume` refuses a restore without calling the driver if it lacks `CREATE_DELETE_SNAPSHOT`. Otherwise it reads the content source from the driver's response. If the response reports no snapshot source ID, the plugin deletes the volume it just got and fails. Without this check, the caller would get back an empty volume without knowing it. If that delete fails, the error includes the volume ID but not the delete's gRPC code. `NotFound` from that delete counts as a successful cleanup, and `CreateVolume` still fails. Only presence is checked, not an exact ID match, because drivers may report the source in their own format (GCE PD reports a numeric snapshot ID). Kubernetes' external-provisioner checks the same way. **Mock plugin** - `MockVolumePlugin` implements the new methods. Its snapshots are always ready to use. ### Testing - New table tests in `plugin_snapshot_test.go` use the existing `mockCSIDriver`, which gains `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` hooks. They cover: - create, get and delete - capability caching, and dropping a capability after `Unimplemented` - refusing `CreateSnapshot` without the capability, and rejecting an empty snapshot ID from the driver - `GetSnapshot` not-found handling (empty list, `NotFound` from the driver), `ErrUnsupported` without `LIST_SNAPSHOTS` or after `Unimplemented`, and rejecting an empty ID - `DeleteSnapshot` error handling, sending it without the capability, and rejecting an empty ID - restore source checking: a missing source fails and deletes the volume, a failed delete reports the volume ID without its gRPC code, a delete answering `NotFound` is not reported, and a source in the driver's own format is accepted - refusing a restore on a driver without snapshot support - Existing CSI plugin tests pass unchanged. - `go test -race ./internal/volume/... ./cmd/ateapi/internal/controlapi` passes. I used an AI coding agent to help write and review this change, and reviewed the result myself. - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR -- Documentation will be added once all parts of the feature are implemented. --------- Signed-off-by: Sneha Aradhey <snehaaradhey@google.com> | 10 days ago | |
Add volume snapshot support to volume plugins (#1849) ## Add volume snapshot support to volume plugins Part of #1951 This is the first PR in the external volume snapshot series. Tags will be able to snapshot an actor's external volumes and seed new actors from those snapshots. This PR adds only the volume plugin layer that work builds on. **There is no API change, and nothing calls the new snapshot methods yet.** ### What changes **Plugin interface** (`internal/volume/plugin.go`) - `CreateVolumeRequest` gains `SourceSnapshotID`, so a volume can be seeded from a snapshot. `CreateVolumeResponse` gains `ContentSourceSnapshotID`, the source the driver reports it actually restored from. - `VolumePluginControlPlane` gains `CreateSnapshot`, `GetSnapshot`, `DeleteSnapshot` and `ControllerCapabilities`, with the `CreateSnapshotRequest`, `Snapshot` and `Capabilities` types. **CSI plugin** (`internal/volume/csi`) - The snapshot methods are built on the controller's `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` RPCs. They use the controller capabilities the plugin already caches. `CreateSnapshot` and `GetSnapshot` drop a capability once the driver answers `Unimplemented` for it. - **`CreateSnapshot`** is refused without calling the driver if the driver lacks the capability. A response with no snapshot ID is an error. - **`GetSnapshot`** uses `ListSnapshots` filtered to one handle, because far more drivers implement it than the newer `GetSnapshot` RPC. An empty list or `NotFound` is reported as *not found*. A driver without `LIST_SNAPSHOTS`, or one that answers `Unimplemented`, returns an error wrapping `errors.ErrUnsupported`, so callers can tell a deleted snapshot from one the driver can't report on. An empty snapshot ID is rejected, so the driver is never asked for an unfiltered list. - **`DeleteSnapshot`** is always sent, even if the capability is missing, because skipping it would leak a handle the driver already issued. `NotFound` counts as success. An empty snapshot ID is rejected. - **Restores:** `CreateVolume` refuses a restore without calling the driver if it lacks `CREATE_DELETE_SNAPSHOT`. Otherwise it reads the content source from the driver's response. If the response reports no snapshot source ID, the plugin deletes the volume it just got and fails. Without this check, the caller would get back an empty volume without knowing it. If that delete fails, the error includes the volume ID but not the delete's gRPC code. `NotFound` from that delete counts as a successful cleanup, and `CreateVolume` still fails. Only presence is checked, not an exact ID match, because drivers may report the source in their own format (GCE PD reports a numeric snapshot ID). Kubernetes' external-provisioner checks the same way. **Mock plugin** - `MockVolumePlugin` implements the new methods. Its snapshots are always ready to use. ### Testing - New table tests in `plugin_snapshot_test.go` use the existing `mockCSIDriver`, which gains `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` hooks. They cover: - create, get and delete - capability caching, and dropping a capability after `Unimplemented` - refusing `CreateSnapshot` without the capability, and rejecting an empty snapshot ID from the driver - `GetSnapshot` not-found handling (empty list, `NotFound` from the driver), `ErrUnsupported` without `LIST_SNAPSHOTS` or after `Unimplemented`, and rejecting an empty ID - `DeleteSnapshot` error handling, sending it without the capability, and rejecting an empty ID - restore source checking: a missing source fails and deletes the volume, a failed delete reports the volume ID without its gRPC code, a delete answering `NotFound` is not reported, and a source in the driver's own format is accepted - refusing a restore on a driver without snapshot support - Existing CSI plugin tests pass unchanged. - `go test -race ./internal/volume/... ./cmd/ateapi/internal/controlapi` passes. I used an AI coding agent to help write and review this change, and reviewed the result myself. - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR -- Documentation will be added once all parts of the feature are implemented. --------- Signed-off-by: Sneha Aradhey <snehaaradhey@google.com> | 10 days ago | |
Add volume snapshot support to volume plugins (#1849) ## Add volume snapshot support to volume plugins Part of #1951 This is the first PR in the external volume snapshot series. Tags will be able to snapshot an actor's external volumes and seed new actors from those snapshots. This PR adds only the volume plugin layer that work builds on. **There is no API change, and nothing calls the new snapshot methods yet.** ### What changes **Plugin interface** (`internal/volume/plugin.go`) - `CreateVolumeRequest` gains `SourceSnapshotID`, so a volume can be seeded from a snapshot. `CreateVolumeResponse` gains `ContentSourceSnapshotID`, the source the driver reports it actually restored from. - `VolumePluginControlPlane` gains `CreateSnapshot`, `GetSnapshot`, `DeleteSnapshot` and `ControllerCapabilities`, with the `CreateSnapshotRequest`, `Snapshot` and `Capabilities` types. **CSI plugin** (`internal/volume/csi`) - The snapshot methods are built on the controller's `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` RPCs. They use the controller capabilities the plugin already caches. `CreateSnapshot` and `GetSnapshot` drop a capability once the driver answers `Unimplemented` for it. - **`CreateSnapshot`** is refused without calling the driver if the driver lacks the capability. A response with no snapshot ID is an error. - **`GetSnapshot`** uses `ListSnapshots` filtered to one handle, because far more drivers implement it than the newer `GetSnapshot` RPC. An empty list or `NotFound` is reported as *not found*. A driver without `LIST_SNAPSHOTS`, or one that answers `Unimplemented`, returns an error wrapping `errors.ErrUnsupported`, so callers can tell a deleted snapshot from one the driver can't report on. An empty snapshot ID is rejected, so the driver is never asked for an unfiltered list. - **`DeleteSnapshot`** is always sent, even if the capability is missing, because skipping it would leak a handle the driver already issued. `NotFound` counts as success. An empty snapshot ID is rejected. - **Restores:** `CreateVolume` refuses a restore without calling the driver if it lacks `CREATE_DELETE_SNAPSHOT`. Otherwise it reads the content source from the driver's response. If the response reports no snapshot source ID, the plugin deletes the volume it just got and fails. Without this check, the caller would get back an empty volume without knowing it. If that delete fails, the error includes the volume ID but not the delete's gRPC code. `NotFound` from that delete counts as a successful cleanup, and `CreateVolume` still fails. Only presence is checked, not an exact ID match, because drivers may report the source in their own format (GCE PD reports a numeric snapshot ID). Kubernetes' external-provisioner checks the same way. **Mock plugin** - `MockVolumePlugin` implements the new methods. Its snapshots are always ready to use. ### Testing - New table tests in `plugin_snapshot_test.go` use the existing `mockCSIDriver`, which gains `CreateSnapshot`, `ListSnapshots` and `DeleteSnapshot` hooks. They cover: - create, get and delete - capability caching, and dropping a capability after `Unimplemented` - refusing `CreateSnapshot` without the capability, and rejecting an empty snapshot ID from the driver - `GetSnapshot` not-found handling (empty list, `NotFound` from the driver), `ErrUnsupported` without `LIST_SNAPSHOTS` or after `Unimplemented`, and rejecting an empty ID - `DeleteSnapshot` error handling, sending it without the capability, and rejecting an empty ID - restore source checking: a missing source fails and deletes the volume, a failed delete reports the volume ID without its gRPC code, a delete answering `NotFound` is not reported, and a source in the driver's own format is accepted - refusing a restore on a driver without snapshot support - Existing CSI plugin tests pass unchanged. - `go test -race ./internal/volume/... ./cmd/ateapi/internal/controlapi` passes. I used an AI coding agent to help write and review this change, and reviewed the result myself. - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR -- Documentation will be added once all parts of the feature are implemented. --------- Signed-off-by: Sneha Aradhey <snehaaradhey@google.com> | 10 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 23 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 10 days ago | ||
| 10 days ago | ||
| 10 days ago | ||
| 23 days ago | ||
| 23 days ago | ||
| 10 days ago | ||
| 10 days ago | ||
| 10 days ago | ||
| 23 days ago |