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

[wip] add systemd services for configuration after start #980

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anjannath
Copy link
Member

@anjannath anjannath commented Oct 21, 2024

this adds 4 small systemd services that:

  • creates crc specific configurations for dnsmasq
  • sets a new uuid as cluster id
  • creates the pod for routes-controller
  • tries to grow the disk and filesystem
  • service that checks if all the cluster operators are ready

address=/apps-crc.testing/$ip
address=/api.crc.testing/$ip
address=/api-int.crc.testing/$ip
address=/$hostName.crc.testing/$iip
Copy link
Member

Choose a reason for hiding this comment

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

why we need this one for node name resolve (in OCP context) Also I think ip should be node name dummy IP which is 192.168.126.11?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah probably not needed now, i think this was needed before moving to SNO and in the crc code-base we still have it so added here as well

Copy link
Member

Choose a reason for hiding this comment

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

did we test it with dummy IP 192.168.126.11 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

you mean using address=/$hostName.crc.testing/192.168.126.11? instead of use the result from hostname -i?

Copy link
Member

Choose a reason for hiding this comment

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

yes right, because this is used by internal service resolution so it might work.

systemd/crc-dnsmasq.sh Outdated Show resolved Hide resolved
createdisk.sh Outdated Show resolved Hide resolved
systemd/crc-dnsmasq.sh Outdated Show resolved Hide resolved
@anjannath anjannath force-pushed the issue_638 branch 4 times, most recently from 8ccdb6e to bd2b783 Compare October 24, 2024 06:13
@anjannath anjannath force-pushed the issue_638 branch 5 times, most recently from 525b66d to 1f5383b Compare November 18, 2024 08:37
done

# need to set a marker to let `crc` know the cluster is ready
# touch /tmp/.crc-cluster-ready
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of creating a file in the guest, you can also write a 'ready' notification message to a socket. podman does something similar: cfergeau@9e80530

[ $retry == $max_retry ] && exit 1
sleep 5
((retry++))
done
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if it is common/recommended to do this, but it might be possible to express "oc get secret ready" as a systemd unit

@anjannath
Copy link
Member Author

/test e2e-snc

@anjannath
Copy link
Member Author

/retest

@anjannath anjannath force-pushed the issue_638 branch 2 times, most recently from 9fd0545 to e6a4516 Compare November 27, 2024 09:13
done

# need to set a marker to let `crc` know the cluster is ready
# touch /tmp/.crc-cluster-ready

Choose a reason for hiding this comment

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

nit, Are these commented-out lines important? If not, shall we remove them?

return 1
}

# rm -rf /tmp/.crc-cluster-ready

Choose a reason for hiding this comment

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

@anjannath anjannath force-pushed the issue_638 branch 3 times, most recently from 12df080 to c4d5572 Compare December 19, 2024 11:06
the services does the various needed tasks to setup
the ocp or microshift cluster, these systemd  units
runs small shell scripts which are based on:
https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh

and does the following tasks:
- creates crc specific configurations for dnsmasq
- sets a new uuid as cluster id
- creates the pod for routes-controller
- tries to grow the disk and filesystem
- checks if the cluster operators are ready
- adds the pull secret to the cluster
- sets kubeadmin and developer user passwords
- sets a custom ca for authentication
- sets custom nip.io cluster domain
Copy link

openshift-ci bot commented Jan 25, 2025

@anjannath: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-microshift 8476885 link true /test e2e-microshift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

4 participants