Skip to content

daemon: health: getShell: simplify logic (LCOW remnants)#49337

Merged
robmry merged 1 commit intomoby:masterfrom
thaJeztah:simplify_health_getshell
Jan 27, 2025
Merged

daemon: health: getShell: simplify logic (LCOW remnants)#49337
robmry merged 1 commit intomoby:masterfrom
thaJeztah:simplify_health_getshell

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

relates to;

This function had some LCOW remnants, where the assumption was made the only on Windows, the image's OS could potentially not match the host's OS (see 3e6a13c).

While we currently are not able to run a Windows image on Linux (or vice versa), this function doesn't have to take into account;

  • If a shell is configured; use whatever is configured
  • otherwise, use "cmd.exe" for Windows images, and "/bin/sh" otherwise (likely Linux, but the existing code did not account for other platforms).

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This function had some LCOW remnants, where the assumption was made
the only on Windows, the image's OS could potentially not match the
host's OS (see 3e6a13c).

While we currently are not able to run a Windows image on Linux (or
vice versa), this function doesn't have to take into account;

- If a shell is configured; use whatever is configured
- otherwise, use "cmd.exe" for Windows images, and "/bin/sh" otherwise
  (likely Linux, but the existing code did not account for other platforms).

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review area/lcow Issues and PR's related to the experimental LCOW feature kind/refactor PR's that refactor, or clean-up code labels Jan 26, 2025
@thaJeztah thaJeztah self-assigned this Jan 26, 2025
Copy link
Copy Markdown

@p1-0tr p1-0tr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robmry robmry merged commit 4f2e128 into moby:master Jan 27, 2025
@thaJeztah thaJeztah deleted the simplify_health_getshell branch January 27, 2025 16:06
@thaJeztah thaJeztah added this to the 28.0.0 milestone Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/lcow Issues and PR's related to the experimental LCOW feature kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants