Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the location of the containerd state/root folders for Windows #764

Merged

Conversation

jsturtevant
Copy link
Contributor

What this PR does / why we need it:

The intent was to have the data folders (state and root be in c:\programdata\containerd\:

- '{{ programfiles.stdout | trim }}\containerd'
- '{{ alluserprofile.stdout | trim }}\containerd\state'
- '{{ alluserprofile.stdout | trim }}\containerd\root'

but the didn't land there due to wrong config:

root = "{{ allusersprofile }}\\root"
state = "{{ allusersprofile }}\\state"

This puts them in the correct location. This should be a non breaking change as it is not user facing but will be less confusing for an admin looking for these folders (right now there are in c:\programdata\root but there are folders in c:\programdata\containerd\

Which issue(s) this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Additional context
Add any other context for the reviewers

/sig windows
/assign @perithompson

@k8s-ci-robot k8s-ci-robot added sig/windows Categorizes an issue or PR as relevant to SIG Windows. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 14, 2021
@jsturtevant
Copy link
Contributor Author

the ubuntu 18.04 image failed:

�[0;32m    vhd-ubuntu-1804: TASK [providers : install Azure clients] ***************************************�[0m
�[0;32m    vhd-ubuntu-1804: fatal: [default]: FAILED! => {"changed": false, "cmd": ["/usr/bin/pip3", "install", "azure-cli"], "msg": "stdout: Collecting azure-cli\n  Downloading https://files.pythonhosted.org/packages/ba/5a

/retest

@jsturtevant
Copy link
Contributor Author

I think my goss validation command is incorrect:

�[0;32m    vhd-windows-2022-containerd:             
"summary-line": "Command: Correct Containerd cni config: stdout: patterns not found:
 [root = \"C:\\ProgramData\\containerd\\root\", state = \"C:\\ProgramData\\containerd\\state\"]",�[0m

exec: "\"/Program Files/containerd/containerd.exe\" config dump"
exit-status: 0
stdout:
- "sandbox_image = \"{{.Vars.pause_image}}\""
- "conf_dir = \"C:/etc/cni/net.d\""
- "bin_dir = \"C:/opt/cni/bin\""
- "root = \"C:\\\\ProgramData\\\\containerd\\\\root\""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is awkward due to the face that we have some forward slashs and some backward slashes. I opened #767 to track fixing this. The code it's self doesn't care but we should be consistent across the project

@jsturtevant
Copy link
Contributor Author

/assign @knabben

@knabben
Copy link
Member

knabben commented Mar 2, 2022

@jsturtevant do you need help to test on vsphere?

@knabben
Copy link
Member

knabben commented Mar 2, 2022

otherwise /lgtm

@jsturtevant
Copy link
Contributor Author

jsturtevant commented Mar 2, 2022

I don't have a vsphere environment. Do you want to test it? The OVA job doesn't have a windows test in but maybe that could be an improvement in the test suite

@knabben
Copy link
Member

knabben commented Mar 16, 2022

@jsturtevant sorry for the delay - finished testing it on vsphere

/lgtm

[2022-03-16T01:41:17.102Z]     vsphere: TASK [runtimes : Create containerd directory structure] ************************
[2022-03-16T01:41:17.102Z]     vsphere: changed: [default] => (item=C:\Program Files\containerd)
[2022-03-16T01:41:18.480Z]     vsphere: changed: [default] => (item=C:\\ProgramData\containerd\state)
[2022-03-16T01:41:19.863Z]     vsphere: changed: [default] => (item=C:\\ProgramData\containerd\root)
[2022-03-16T01:41:21.238Z]     vsphere: changed: [default] => (item=C:/opt/cni/bin)
[2022-03-16T01:41:23.150Z]     vsphere: changed: [default] => (item=C:/etc/cni/net.d)

.... goss ---

{
[2022-03-16T01:48:30.793Z]     vsphere:             "duration": 0,
[2022-03-16T01:48:30.793Z]     vsphere:             "err": null,
[2022-03-16T01:48:30.793Z]     vsphere:             "expected": [
[2022-03-16T01:48:30.793Z]     vsphere:                 "sandbox_image = \"projects-stg.registry.vmware.com/tkg/pause:3.4.1-windows-amd64\"",
[2022-03-16T01:48:30.793Z]     vsphere:                 "conf_dir = \"C:/etc/cni/net.d\"",
[2022-03-16T01:48:30.793Z]     vsphere:                 "bin_dir = \"C:/opt/cni/bin\"",
[2022-03-16T01:48:30.793Z]     vsphere:                 "root = \"C:\\\\ProgramData\\\\containerd\\\\root\"",
[2022-03-16T01:48:30.794Z]     vsphere:                 "state = \"C:\\\\ProgramData\\\\containerd\\\\state\""
[2022-03-16T01:48:30.794Z]     vsphere:             ],
[2022-03-16T01:48:30.794Z]     vsphere:             "found": [
[2022-03-16T01:48:30.794Z]     vsphere:                 "root = \"C:\\\\ProgramData\\\\containerd\\\\root\"",
[2022-03-16T01:48:30.794Z]     vsphere:                 "state = \"C:\\\\ProgramData\\\\containerd\\\\state\"",
[2022-03-16T01:48:30.794Z]     vsphere:                 "sandbox_image = \"projects-stg.registry.vmware.com/tkg/pause:3.4.1-windows-amd64\"",
[2022-03-16T01:48:30.794Z]     vsphere:                 "bin_dir = \"C:/opt/cni/bin\"",
[2022-03-16T01:48:30.794Z]     vsphere:                 "conf_dir = \"C:/etc/cni/net.d\""
[2022-03-16T01:48:30.794Z]     vsphere:             ],
[2022-03-16T01:48:30.794Z]     vsphere:             "human": "",
[2022-03-16T01:48:30.794Z]     vsphere:             "meta": null,
[2022-03-16T01:48:30.794Z]     vsphere:             "property": "stdout",
[2022-03-16T01:48:30.794Z]     vsphere:             "resource-id": "Correct Containerd config",
[2022-03-16T01:48:30.794Z]     vsphere:             "resource-type": "Command",
[2022-03-16T01:48:30.794Z]     vsphere:             "result": 0,
[2022-03-16T01:48:30.794Z]     vsphere:             "successful": true,
[2022-03-16T01:48:30.794Z]     vsphere:             "summary-line": "Command: Correct Containerd config: stdout: matches expectation: [sandbox_image = \"projects-stg.registry.vmware.com/tkg/pause:3.4.1-windows-amd64\" conf_dir = \"C:/etc/cni/net.d\" bin_dir = \"C:/opt/cni/bin\" root = \"C:\\\\ProgramData\\\\containerd\\\\root\" state = \"C:\\\\ProgramData\\\\containerd\\\\state\"]",

containerd

PS C:\Users\capv> ls C:\ProgramData\containerd\root


    Directory: C:\ProgramData\containerd\root


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        3/16/2022   1:41 AM                io.containerd.content.v1.content
d-----        3/16/2022   1:41 AM                io.containerd.metadata.v1.bolt
d-----        3/16/2022   1:41 AM                io.containerd.runtime.v2.task
d-----        3/16/2022   1:41 AM                io.containerd.snapshotter.v1.windows
d-----        3/16/2022   1:41 AM                io.containerd.snapshotter.v1.windows-lcow
d-----        3/16/2022   1:41 AM                opt
-a----        3/16/2022   2:03 AM              0 panic.log


PS C:\Users\capv> ls C:\ProgramData\containerd\state


    Directory: C:\ProgramData\containerd\state


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        3/16/2022   1:41 AM                io.containerd.runtime.v2.task

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2022
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/approve

@CecileRobertMichon
Copy link
Contributor

/approve

1 similar comment
@jsturtevant
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jsturtevant

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2022
@k8s-ci-robot k8s-ci-robot merged commit 694662d into kubernetes-sigs:master Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants