diff mbox series

[ovs-dev] github: Fix up malformed /etc/hosts.

Message ID 20210511142326.3909560-1-i.maximets@ovn.org
State Accepted
Headers show
Series [ovs-dev] github: Fix up malformed /etc/hosts. | expand

Commit Message

Ilya Maximets May 11, 2021, 2:23 p.m. UTC
For some reason /etc/hosts in GHA now contains a plain text line
like this:

  Note: Don't Delete this file. Also, don't remove this line. ...

This breaks libunbound and makes a series of unit tests to emit
following warning:
  |00001|dns_resolve|WARN|Failed to read etc/hosts: syntax error

Working around this issue by removing a bad line from /etc/hosts
until this fixed properly by GitHub team.

Bug for virtual-environments:
  https://github.com/actions/virtual-environments/issues/3353

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---

Almost successful build with this change applied:
  https://github.com/igsilya/ovn/actions/runs/831854402
(system tests failed because of a flaky test)

Same patch for OVS:
  https://patchwork.ozlabs.org/project/openvswitch/patch/20210511132049.3906854-1-i.maximets@ovn.org/

 .github/workflows/test.yml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Dumitru Ceara May 11, 2021, 2:33 p.m. UTC | #1
On 5/11/21 4:23 PM, Ilya Maximets wrote:
> For some reason /etc/hosts in GHA now contains a plain text line
> like this:
> 
>   Note: Don't Delete this file. Also, don't remove this line. ...
> 
> This breaks libunbound and makes a series of unit tests to emit
> following warning:
>   |00001|dns_resolve|WARN|Failed to read etc/hosts: syntax error
> 
> Working around this issue by removing a bad line from /etc/hosts
> until this fixed properly by GitHub team.
> 
> Bug for virtual-environments:
>   https://github.com/actions/virtual-environments/issues/3353
> 
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
Numan Siddique May 11, 2021, 3:37 p.m. UTC | #2
On Tue, May 11, 2021 at 10:34 AM Dumitru Ceara <dceara@redhat.com> wrote:
>
> On 5/11/21 4:23 PM, Ilya Maximets wrote:
> > For some reason /etc/hosts in GHA now contains a plain text line
> > like this:
> >
> >   Note: Don't Delete this file. Also, don't remove this line. ...
> >
> > This breaks libunbound and makes a series of unit tests to emit
> > following warning:
> >   |00001|dns_resolve|WARN|Failed to read etc/hosts: syntax error
> >
> > Working around this issue by removing a bad line from /etc/hosts
> > until this fixed properly by GitHub team.
> >
> > Bug for virtual-environments:
> >   https://github.com/actions/virtual-environments/issues/3353
> >
> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> > ---
>
> Looks good to me, thanks!
>
> Acked-by: Dumitru Ceara <dceara@redhat.com>

Thanks Ilya and Dumitru for fixin this.

I applied this patch to the main branch.  At this point, I'm not
backporting to the branches.
Let me know if it is required.

Thanks
Numan

>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 4a150a312..d7bb7eecf 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -87,6 +87,12 @@  jobs:
       if:   matrix.m32 != ''
       run:  sudo apt install -y ${{ env.m32_dependecies }}
 
+    - name: fix up /etc/hosts
+      # https://github.com/actions/virtual-environments/issues/3353
+      run:  |
+        cat /etc/hosts
+        sudo sed -i "/don't remove this line/d" /etc/hosts || true
+
     - name: update PATH
       run:  |
         echo "$HOME/bin"        >> $GITHUB_PATH