microsoft / microsoft/trident

Add mechanism for host configuration patching before an update (delta update)

Open
#286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
32
Forks
18
Avg merge
1d 17h
Merged PRs (30d)
31

Description

Currently to trigger an update one must pass a full Host Config to Trident, however, must updates will just want to change one or two fields in the configuration. Having to get the entire file and surgically update the desired fields imposes an extra burden on users.

A `trident patch` action could be used to grab the existing host configuration and apply a patch on it, leaving trident in a "preparing update" state with a cached HC. A user would then be able to just invoke "trident update" to trigger an update using the patched host configuration.

The bulk of the work is defining the API for patching to make it simple to use both programmatically and by humans.

We could look into established mechanisms, such as RFC6902 (probably my suggestion), or what other tools that deal with merging YAML documents do (eg. kubectl patch, kustomize, etc)

Trident uses many lists, so an API that is friendly when modifying lists is desirable.

We're also not modifying arbitrary structures, but a well-known one (Host Config) so maybe the approach for us is _not_ to use a generic API but rather a bespoke API for each area of HC. (This would also allow us to just not expose apis for things that cannot be changes, such as storage)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing trident update action and the Host Config input and caching flow. Review RFC6902, kubectl patch, and kustomize as possible models, paying attention to list changes and immutable Host Config areas. Done means a defined patch API can leave Trident in a preparing-update state and let trident update use the patched configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.