Skip to content

pkg/kvp: various fixes#36

Merged
openshift-merge-robot merged 8 commits intocontainers:mainfrom
bgilbert:kvp
Jun 28, 2023
Merged

pkg/kvp: various fixes#36
openshift-merge-robot merged 8 commits intocontainers:mainfrom
bgilbert:kvp

Conversation

@bgilbert
Copy link
Copy Markdown
Contributor

Fix some things used by Ignition, and some other things I noticed along the way. See individual commits for details.

cc @baude

bgilbert added 8 commits June 28, 2023 07:09
Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
Represent the values in octal to avoid setting the modes to garbage.
Also, create parent directories with mode 755, since that matches what
hv_kvp_daemon does, and world-writable directories in system paths are
potentially dangerous.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
The contents of any existing pool file are presumably stale, so it doesn't
make sense to fail if one exists (after we've potentially already written
out some of the other pools).

Also fixes a stray format escape passed to a function that doesn't
respect them.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
Ignition has a use for it.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
The leftOvers return value doesn't actually do what it says, and isn't
used by Ignition, which is the only caller.  Remove it.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
In read(2), also retry on EINTR.  In poll(2), only retry on EINTR; EFAULT
and ENOMEM are also fatal.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
The host can send us other message types, which we aren't prepared to
handle.  Rather than returning a bogus response or letting the protocol
desynchronize, just return a failure in this case.

Signed-off-by: Benjamin Gilbert <bgilbert@redhat.com>
@baude
Copy link
Copy Markdown
Member

baude commented Jun 28, 2023

/approve
/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude, bgilbert

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

The pull request process is described here

Details 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

@openshift-merge-robot openshift-merge-robot merged commit e6a199a into containers:main Jun 28, 2023
@bgilbert bgilbert deleted the kvp branch June 28, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants