`public_key` and `network` in kickstart do not work when install photon os with ostree
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 692
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I tried to use photon-4.0-c001795b8.iso to install a photon OS with default RPM-OSTree server. And I configured network manually like below.
As a result, it didn't work! The IP address of interface eth0 was not as expect.
Futhermore, I used kickstart to auto-install photon OS with default RPM-OSTree repo, and I filled the fields public_key and network in the kickstart configuration file like below.
{
"hostname": "photon-machine",
"password":
{
"crypted": false,
"text": "password"
},
"disk": "/dev/vda",
"partitions": [
{"mountpoint": "/", "size": 0, "filesystem": "ext4"},
{"mountpoint": "/boot", "size": 128, "filesystem": "ext4"},
{"mountpoint": "/root", "size": 128, "filesystem": "ext4"}
],
"postinstall": [
"#!/bin/sh",
"echo "Hello World" > /etc/postinstall"
],
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4nlcKKj9xqs...",
"network":
{
"type": "static",
"ip_addr": "192.168.122.3",
"netmask": "255.255.255.0",
"gateway": "192.168.122.1",
"nameserver": "192.168.122.1"
},
"linux_flavor": "linux",
"photon_docker_image": "photon:3.0",
"photon_release_version": "4.0",
"ostree":
{
"default_repo": true
}
}
As a result, the static IP address was still not configured! And the file ~/.ssh/authorized_keys was empty.
BTW, the network and public_key worked as expect in kickstart when I didn't use ostree.
Reproduction steps
1.Use kickstart config above to build an ISO image as https://vmware.github.io/photon/docs/user-guide/working-with-kickstart/#unattended-installation-through-kickstart guide.
2.Use the ISO to install photon OS.
3.In photon OS, check IP address of interface eth0, and the file /root/.ssh/authorized_keys
...
Expected behavior
- The IP address of interface eth0 is
192.168.122.3/24, and the network configuration file/etc/systemd/network/99-dhcp-en.networkis set correctly. - The publick key is added to the file
/root/.ssh/authorized_keys.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the kickstart configuration and the unattended-installation guide, then reproduce the RPM-OSTree installation. Check how the install handles the network settings and public_key, using /etc/systemd/network/99-dhcp-en.network and /root/.ssh/authorized_keys as verification points. Done means the static eth0 address and expected network file are present and the public key is installed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100