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

feat: add rancher-system-agent env.conf #607

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

FrankYang0529
Copy link
Member

Problem:
Run journalctl -u rancher-system-agent.service in harvester node and we can see log like:

Dec 01 02:27:39 harvester-node-0 rancher-system-agent[15569]: time="2023-12-01T02:27:39Z" level=info msg="[Applyinator] Running command: sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null]"
Dec 01 02:27:39 harvester-node-0 rancher-system-agent[15569]: time="2023-12-01T02:27:39Z" level=info msg="[Applyinator] Command sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null] finished with err: <nil> and exit code: 127"

Solution:
Add /opt/rke2/bin to rancher-system-agent PATH.

Related Issue:
harvester/harvester#4803

Test plan:

  1. Install harvester.
  2. Run journalctl -u rancher-system-agent.service and see rke2 etcd-snapshot list with exit code 0:
msg="[Applyinator] Running command: sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null]"
msg="[9fbfd1d387d3a1762da058468cc7c49cb89e6481208ee1bd164b864d40917b55_0:stdout]: Name                                      Location                                                                                   Size     Created"
msg="[9fbfd1d387d3a1762da058468cc7c49cb89e6481208ee1bd164b864d40917b55_0:stdout]: etcd-snapshot-harvester-node-0-1701345604 file:///var/lib/rancher/rke2/server/db/snapshots/etcd-snapshot-harvester-node-0-1701345604 56201248 2023-11-30T12:00:04Z"
msg="[9fbfd1d387d3a1762da058468cc7c49cb89e6481208ee1bd164b864d40917b55_0:stdout]: etcd-snapshot-harvester-node-0-1701388801 file:///var/lib/rancher/rke2/server/db/snapshots/etcd-snapshot-harvester-node-0-1701388801 56201248 2023-12-01T00:00:01Z"
msg="[Applyinator] Command sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null] finished with err: <nil> and exit code: 0"
msg="[K8s] updated plan secret fleet-local/custom-92281fa60bd5-machine-plan with feedback"

Copy link
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing that!

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

LGTM!

@bk201 bk201 merged commit 87c2b5c into harvester:master Dec 28, 2023
5 checks passed
@bk201
Copy link
Member

bk201 commented Dec 28, 2023

@Mergifyio backport v1.2

Copy link

mergify bot commented Dec 28, 2023

backport v1.2

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants