Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-11473] Node agent fails to come up on air-gap public cloud prov…
…iders like aws due to selinux Summary: In airgap installation, skip installing semanage and use chcon (available) instead. Also move the firewall exception addition outside of selinux check. Test Plan: 1. Created a provider with airgap enabled. 2. Create a universe. 3. Verified the command line contains --airgap. ``` 2023-11-18T00:30:31.486Z [info] 5ad4fc3d-d0c1-4cb9-b906-b25818a5ddc8 ShellProcessHandler.java:185 [TaskPool-CreateUniverse(fc31acad-a358-4622-8345-ada324fbb0cc)-0] com.yugabyte.yw.common.ShellProcessHandler Starting proc (full cmd) - 'bin/py_wrapper' 'bin/run_node_action.py' '--is_master' '--node_name' 'yb-admin-nsingh-test-universe1-n1' 'ssh' '--port' '22' '--ip' '10.9.117.17' '--key' '/opt/yugaware/keys/ffc283e8-eed6-4cdb-a4c5-a7370866cd17/yb-admin-aws-airgap1_ffc283e8-eed6-4cdb-a4c5-a7370866cd17-key.pem' '--user' 'ec2-user' 'run_command' '--command' 'sudo' '-H' '/bin/bash' '-c' 'rm -rf /root/node-agent && tar -zxf /tmp/node-agent-1700267413499/node-agent/release/node-agent.tgz --strip-components=3 -C /tmp/node-agent-1700267413499/node-agent --wildcards */node-agent-installer.sh && mv -f /tmp/node-agent-1700267413499/node-agent /root/node-agent && chmod +x /root/node-agent/node-agent-installer.sh && /root/node-agent/node-agent-installer.sh -c install --skip_verify_cert --disable_egress --id 23e1d6cd-26c5-4fbc-b5ac-0f27ad5f2cf2 --customer_id f33e3c9b-75ab-4c30-80ad-cba85646ea39 --cert_dir 25c6d086-e242-452a-bdb3-15bce302a5f0 --node_name yb-admin-nsingh-test-universe1-n1 --node_ip 10.9.117.17 --node_port 10070 --airgap && chmod 755 /root /root/node-agent && rm -rf /root/node-agent/node-agent-installer.sh' - logging stdout=/tmp/shell_process_out13128525809232153353tmp, stderr=/tmp/shell_process_err6772678925750908315tmp ``` 3. Universe creation succeeded. 4. Verified that semanage was not installed. ``` [ec2-user@ip-10-9-117-17 ~]$ sudo semamage sudo: semamage: command not found ``` Reviewers: cwang, nbhatia, sanketh Reviewed By: cwang Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D30331
- Loading branch information