* [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks
@ 2024-05-01 14:03 cel
2024-05-01 14:03 ` [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://" cel
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: cel @ 2024-05-01 14:03 UTC (permalink / raw)
To: kdevops; +Cc: Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
To get mirroring to work on Fedora, I had to install the git-daemon
package, because on Fedora, git-daemon is not included in the
git-core package.
Also, Fedora's default firewall configuration does not permit git
traffic.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
.../tasks/install-deps/fedora/main.yml | 24 +++++++++++++++++++
playbooks/roles/linux-mirror/tasks/main.yml | 5 ++++
2 files changed, 29 insertions(+)
create mode 100644 playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
diff --git a/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
new file mode 100644
index 000000000000..2a93256a3d6e
--- /dev/null
+++ b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Install Fedora-specific dependencies
+ become: true
+ become_flags: 'su - -c'
+ become_method: ansible.builtin.sudo
+ ansible.builtin.package:
+ name:
+ - git-daemon
+ state: present
+ when:
+ - install_linux_mirror|bool
+
+- name: Open the firewall on control node for git traffic
+ become: true
+ become_flags: 'su - -c'
+ become_method: ansible.builtin.sudo
+ ansible.posix.firewalld:
+ zone: libvirt
+ port: 9418/tcp
+ permanent: true
+ immediate: true
+ state: enabled
+ when:
+ - install_linux_mirror|bool
diff --git a/playbooks/roles/linux-mirror/tasks/main.yml b/playbooks/roles/linux-mirror/tasks/main.yml
index 461e131c93fd..a8f673c6d4ee 100644
--- a/playbooks/roles/linux-mirror/tasks/main.yml
+++ b/playbooks/roles/linux-mirror/tasks/main.yml
@@ -10,6 +10,11 @@
skip: true
tags: vars
+- name: Install dependencies for the linux-mirror role
+ ansible.builtin.include_tasks: install-deps/fedora/main.yml
+ when:
+ - ansible_distribution == 'Fedora'
+
- name: Set up the mirrors.yaml based on preferences configured
tags: [ 'mirror' ]
template:
base-commit: d97440f49b5b5ecb65383a1874014391ca795899
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://"
2024-05-01 14:03 [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks cel
@ 2024-05-01 14:03 ` cel
2024-05-01 14:03 ` [RFC PATCH 3/3] get-distro-default-bridge.sh: Set specific IP address for Fedora cel
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: cel @ 2024-05-01 14:03 UTC (permalink / raw)
To: kdevops; +Cc: Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
The script should always return only an IP address, not a URL.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
scripts/get-distro-default-bridge.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/get-distro-default-bridge.sh b/scripts/get-distro-default-bridge.sh
index 09d09ff04ee1..d85625c4ebd8 100755
--- a/scripts/get-distro-default-bridge.sh
+++ b/scripts/get-distro-default-bridge.sh
@@ -9,7 +9,7 @@ VIRT_TYPE=$2
# a different deafult it should be easy for you to extend it here.
if [[ "$VIRT_TYPE" == "vagrant" ]]; then
- echo "http://192.168.124.1"
+ echo "192.168.124.1"
else
echo "192.168.122.1"
fi
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH 3/3] get-distro-default-bridge.sh: Set specific IP address for Fedora
2024-05-01 14:03 [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks cel
2024-05-01 14:03 ` [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://" cel
@ 2024-05-01 14:03 ` cel
2024-05-01 14:29 ` [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks Chuck Lever
2024-05-01 19:12 ` Luis Chamberlain
3 siblings, 0 replies; 6+ messages in thread
From: cel @ 2024-05-01 14:03 UTC (permalink / raw)
To: kdevops; +Cc: Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
Fedora appears to use 192.168.122.1 for both guestfs and vagrant.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
scripts/get-distro-default-bridge.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/get-distro-default-bridge.sh b/scripts/get-distro-default-bridge.sh
index d85625c4ebd8..d1321db5acf2 100755
--- a/scripts/get-distro-default-bridge.sh
+++ b/scripts/get-distro-default-bridge.sh
@@ -8,6 +8,12 @@ VIRT_TYPE=$2
# is if you are using vagrant or guestfs. If your distribution needs
# a different deafult it should be easy for you to extend it here.
+DISTRO_FEDORA=`scripts/os-release-check.sh fedora`
+if [[ "$DISTRO_FEDORA" == "y" ]]; then
+ echo "192.168.122.1"
+ exit 0
+fi
+
if [[ "$VIRT_TYPE" == "vagrant" ]]; then
echo "192.168.124.1"
else
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks
2024-05-01 14:03 [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks cel
2024-05-01 14:03 ` [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://" cel
2024-05-01 14:03 ` [RFC PATCH 3/3] get-distro-default-bridge.sh: Set specific IP address for Fedora cel
@ 2024-05-01 14:29 ` Chuck Lever
2024-05-01 19:12 ` Luis Chamberlain
3 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2024-05-01 14:29 UTC (permalink / raw)
To: cel; +Cc: kdevops
On Wed, May 01, 2024 at 10:03:33AM -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> To get mirroring to work on Fedora, I had to install the git-daemon
> package, because on Fedora, git-daemon is not included in the
> git-core package.
>
> Also, Fedora's default firewall configuration does not permit git
> traffic.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> .../tasks/install-deps/fedora/main.yml | 24 +++++++++++++++++++
If it turns out that RHEL/CentOS needs this treatment as well, we
can rename this install-deps/redhat/main.yml, and change the
"when:" clause below.
I don't have a RHEL/CentOS control node on hand to test that.
> playbooks/roles/linux-mirror/tasks/main.yml | 5 ++++
> 2 files changed, 29 insertions(+)
> create mode 100644 playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
>
> diff --git a/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
> new file mode 100644
> index 000000000000..2a93256a3d6e
> --- /dev/null
> +++ b/playbooks/roles/linux-mirror/tasks/install-deps/fedora/main.yml
> @@ -0,0 +1,24 @@
> +---
> +- name: Install Fedora-specific dependencies
> + become: true
> + become_flags: 'su - -c'
> + become_method: ansible.builtin.sudo
> + ansible.builtin.package:
> + name:
> + - git-daemon
> + state: present
> + when:
> + - install_linux_mirror|bool
> +
> +- name: Open the firewall on control node for git traffic
> + become: true
> + become_flags: 'su - -c'
> + become_method: ansible.builtin.sudo
> + ansible.posix.firewalld:
> + zone: libvirt
> + port: 9418/tcp
> + permanent: true
> + immediate: true
> + state: enabled
> + when:
> + - install_linux_mirror|bool
> diff --git a/playbooks/roles/linux-mirror/tasks/main.yml b/playbooks/roles/linux-mirror/tasks/main.yml
> index 461e131c93fd..a8f673c6d4ee 100644
> --- a/playbooks/roles/linux-mirror/tasks/main.yml
> +++ b/playbooks/roles/linux-mirror/tasks/main.yml
> @@ -10,6 +10,11 @@
> skip: true
> tags: vars
>
> +- name: Install dependencies for the linux-mirror role
> + ansible.builtin.include_tasks: install-deps/fedora/main.yml
> + when:
> + - ansible_distribution == 'Fedora'
> +
> - name: Set up the mirrors.yaml based on preferences configured
> tags: [ 'mirror' ]
> template:
>
> base-commit: d97440f49b5b5ecb65383a1874014391ca795899
> --
> 2.44.0
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks
2024-05-01 14:03 [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks cel
` (2 preceding siblings ...)
2024-05-01 14:29 ` [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks Chuck Lever
@ 2024-05-01 19:12 ` Luis Chamberlain
2024-05-02 13:12 ` Chuck Lever III
3 siblings, 1 reply; 6+ messages in thread
From: Luis Chamberlain @ 2024-05-01 19:12 UTC (permalink / raw)
To: cel; +Cc: kdevops, Chuck Lever
On Wed, May 01, 2024 at 10:03:33AM -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> To get mirroring to work on Fedora, I had to install the git-daemon
> package, because on Fedora, git-daemon is not included in the
> git-core package.
>
> Also, Fedora's default firewall configuration does not permit git
> traffic.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks
2024-05-01 19:12 ` Luis Chamberlain
@ 2024-05-02 13:12 ` Chuck Lever III
0 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever III @ 2024-05-02 13:12 UTC (permalink / raw)
To: Luis Chamberlain; +Cc: Chuck Lever, kdevops@lists.linux.dev
> On May 1, 2024, at 3:12 PM, Luis Chamberlain <mcgrof@kernel.org> wrote:
>
> On Wed, May 01, 2024 at 10:03:33AM -0400, cel@kernel.org wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>>
>> To get mirroring to work on Fedora, I had to install the git-daemon
>> package, because on Fedora, git-daemon is not included in the
>> git-core package.
>>
>> Also, Fedora's default firewall configuration does not permit git
>> traffic.
>>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>
> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Thanks! Since I didn't send a cover letter, should I assume
this applies to all three patches in this series?
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-02 13:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 14:03 [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks cel
2024-05-01 14:03 ` [RFC PATCH 2/3] get-distro-default-bridge.sh: Remove "http://" cel
2024-05-01 14:03 ` [RFC PATCH 3/3] get-distro-default-bridge.sh: Set specific IP address for Fedora cel
2024-05-01 14:29 ` [RFC PATCH 1/3] linux-mirror: Add Fedora-specific tasks Chuck Lever
2024-05-01 19:12 ` Luis Chamberlain
2024-05-02 13:12 ` Chuck Lever III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox