Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

ASSISTED_SERVICE_ENV_FILE="/usr/local/share/assisted-service/assisted-service.env"
DISK_SIZE_GB=100

# Increase disk size requirement for NoRegistryClusterInstall aka OVE
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Increase disk size requirement for NoRegistryClusterInstall aka OVE
# Increase disk size requirement for NoRegistryClusterInstall

if [ -f /etc/assisted/extra-manifests/internalreleaseimage.yaml ]; then
DISK_SIZE_GB=220
fi

HW_VALIDATOR_REQUIREMENTS="[{\"version\":\"default\",\"master\":{\"cpu_cores\":4,\"ram_mib\":16384,\"disk_size_gb\":${DISK_SIZE_GB},\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":100,\"packet_loss_percentage\":0},\"arbiter\":{\"cpu_cores\":2,\"ram_mib\":8192,\"disk_size_gb\":50,\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":1000,\"packet_loss_percentage\":0},\"worker\":{\"cpu_cores\":2,\"ram_mib\":8192,\"disk_size_gb\":${DISK_SIZE_GB},\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":1000,\"packet_loss_percentage\":10},\"sno\":{\"cpu_cores\":8,\"ram_mib\":16384,\"disk_size_gb\":${DISK_SIZE_GB},\"installation_disk_speed_threshold_ms\":10}}]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to manage the whole block? Ie, I was expecting a more narrowed change, something like:

sed 's/"disk_size_gb":[0-9]\+/"disk_size_gb":220/g'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The master, worker and sno all have common disk size of 100 while arbiter has 50. This regex will also change the value for arbiter from 50 to 220. I thought we don't need that but if thats ok, the approach you have suggested could be used instead.


sed -i "s|^HW_VALIDATOR_REQUIREMENTS=.*|HW_VALIDATOR_REQUIREMENTS=$HW_VALIDATOR_REQUIREMENTS|" "$ASSISTED_SERVICE_ENV_FILE"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DISK_ENCRYPTION_SUPPORT=true
DUMMY_IGNITION=false
ENABLE_SINGLE_NODE_DNSMASQ=true
EPHEMERAL_INSTALLER_CLUSTER_TLS_CERTS_OVERRIDE_DIR=/opt/agent/tls
HW_VALIDATOR_REQUIREMENTS=[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"arbiter":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":50,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10}}]
HW_VALIDATOR_REQUIREMENTS=TO_BE_REPLACED_BY_SYSTEMD
INSTALL_INVOKER=agent-installer
IPV6_SUPPORT=true
TNA_CLUSTERS_SUPPORT=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ After=network-online.target assisted-service-pod.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=/usr/local/share/assisted-service/agent-images.env

Restart=on-failure
TimeoutStartSec=500
TimeoutStopSec=300

ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStartPre=/usr/local/bin/configure-assisted-hw-requirements.sh

ExecStart=/usr/bin/podman run --net host --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service -v /opt/agent/tls:/opt/agent/tls:z {{ if .HaveMirrorConfig }}-v /etc/containers:/etc/containers{{ end }} {{.CaBundleMount}} --env-file=/etc/assisted/rendezvous-host.env --env-file=/usr/local/share/assisted-service/assisted-service.env --env-file=/usr/local/share/assisted-service/images.env --env-file=/etc/assisted/node0 --env-file=/usr/local/share/assisted-service/agent-images.env $SERVICE_IMAGE

ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id

Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions pkg/asset/agent/image/ignition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ func commonFiles() []string {
"/usr/local/bin/add-node.sh",
"/usr/local/bin/agent-auth-token-status.sh",
"/usr/local/bin/common.sh",
"/usr/local/bin/configure-assisted-hw-requirements.sh",
}
}

Expand Down