Skip to content

openshift_node: "restart node" ansible task fails sometimes #13318

Closed

Description

@php-coder
16:19:50 RUNNING HANDLER [openshift_node : restart node] ********************************
16:19:51 
fatal: [localhost]: FAILED! => {
16:19:51     "changed": false, 
16:19:51     "failed": true
16:19:51 }
16:19:51 
16:19:51 MSG:
16:19:51 
16:19:51 Unable to start service origin-node: Job for origin-node.service failed because the control process exited with error code. See "systemctl status origin-node.service" and "journalctl -xe" for details.
16:19:51 
16:19:51 
16:19:51 PLAY RECAP *********************************************************************
16:19:51  [WARNING]: Could not create retry file '/usr/share/ansible/openshift-
16:19:51 ansible/playbooks/byo/config.retry'.         [Errno 13] Permission denied:
16:19:51 u'/usr/share/ansible/openshift-ansible/playbooks/byo/config.retry'
16:19:51 localhost                  : ok=484  changed=132  unreachable=0    failed=1

Seen there:

CC @stevekuznetsov

Activity

  1. added
    kind/test-flake
    on Mar 9, 2017
  2. php-coder commented on Mar 10, 2017

    @php-coder
    Author

    @stevekuznetsov Could you advise how to debug it? Without output of systemctl status origin-node.service and journalctl -xe it looks impossible.

  3. stevekuznetsov commented on Mar 10, 2017

    @stevekuznetsov
    Contributor

    New jobs will have these artifacts -- look under generated/ and journals/ in S3

  4. stevekuznetsov commented on Mar 11, 2017

    @stevekuznetsov
    Contributor

    There was a merge_pull_request_openshift_ansible job that failed with this recently... from the node logs:

    origin-node[30079]: I0310 17:33:18.547521   30079 ovs.go:62] Executing: ovs-ofctl -O OpenFlow13 dump-flows br0
    origin-node[30079]: I0310 17:33:18.550772   30079 ovs.go:66] Error executing ovs-ofctl: ovs-ofctl: br0 is not a bridge or a socket
    origin-node[30079]: I0310 17:33:18.550795   30079 controller.go:213] [SDN setup] full SDN setup required
    origin-node[30079]: I0310 17:33:18.550921   30079 ovs.go:62] Executing: ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
    ovs-vsctl[30319]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
    ovs-vsctl[30319]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
    origin-node[30079]: I0310 17:33:18.555231   30079 ovs.go:66] Error executing ovs-vsctl: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
    origin-node[30079]: F0310 17:33:18.555255   30079 node.go:351] error: SDN node startup failed: exit status 1
    systemd[1]: origin-node.service: main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start Origin Node.
    systemd[1]: Unit origin-node.service entered failed state.
    systemd[1]: origin-node.service failed.
    

    @sdodson have you seen this?

  5. stevekuznetsov commented on Mar 11, 2017

    @stevekuznetsov
    Contributor

    The job was running with

    openvswitch.x86_64 2.5.0-22.git20160727.el7 @centos-paas-sig-openshift-future-rpms
    
  6. sdodson commented on Mar 11, 2017

    @sdodson
    Member
  7. stevekuznetsov commented on Mar 11, 2017

    @stevekuznetsov
    Contributor

    We're also logging those with

    00:37:37.039 + ssh -F ./.config/origin-ci-tool/inventory/.ssh_config openshiftdevel 'sudo ausearch -m avc 2>&1'
    

    The output from that run, though...

    <no matches>
    
  8. sdodson commented on Mar 11, 2017

    @sdodson
    Member

    @stevekuznetsov you're capturing a subset of the journals, why not capture all of them? I'd be interested in seeing if ovsdb is crashing or otherwise restarting.

  9. sdodson commented on Mar 11, 2017

    @sdodson
    Member

    All of them as in don't filter based on any service so we get the complete journal in the s3 bucket.

  10. stevekuznetsov commented on Mar 11, 2017

    @stevekuznetsov
    Contributor

    I was working on a script that would get us all dependent services, as I was afraid that "all" might be huge amount of storage space. I'll work on that early next week.

  11. stevekuznetsov commented on Mar 11, 2017

    @stevekuznetsov
    Contributor

    Something like:

    for unit in $( systemctl list-dependencies docker.service --plain ); do
        if systemctl is-failed "${unit}" --quiet; then
            journalctl "${unit}"
        fi
    done

    Or are we worried about units not in that dependency tree, and should we just dump the entire journal?

  12. sdodson commented on Mar 13, 2017

    @sdodson
    Member

    I'd first figure out how large the entire journal is. If it's acceptable to store that then lets just do that. These aren't long running instances so journals shouldn't be huge and the chattiest of the processes (assuming we're setting debug levels) like master, node, docker are already captured. The only concern would be if some credentials were being logged I guess.

  13. stevekuznetsov commented on Mar 13, 2017

    @stevekuznetsov
    Contributor

    Dumping full journal in openshift-eng/aos-cd-jobs#103

  14. stevekuznetsov commented on Mar 13, 2017

    @stevekuznetsov
    Contributor

    There is now a new job with this failure... which has the full journalctl output.

  15. stevekuznetsov commented on Mar 13, 2017

    @stevekuznetsov
    Contributor

    Seen here as well, here is the openvswitch log. From the node log, as before:

    origin-node[14333]: I0313 15:42:53.099059   14333 ovs.go:62] Executing: ovs-ofctl -O OpenFlow13 dump-flows br0
    origin-node[14333]: I0313 15:42:53.102467   14333 ovs.go:66] Error executing ovs-ofctl: ovs-ofctl: br0 is not a bridge or a socket
    origin-node[14333]: I0313 15:42:53.102485   14333 controller.go:213] [SDN setup] full SDN setup required
    origin-node[14333]: I0313 15:42:53.102579   14333 ovs.go:62] Executing: ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
    ovs-vsctl[14598]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
    ovs-vsctl[14598]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
    origin-node[14333]: I0313 15:42:53.107222   14333 ovs.go:66] Error executing ovs-vsctl: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
    origin-node[14333]: F0313 15:42:53.107251   14333 node.go:351] error: SDN node startup failed: exit status 1
    systemd[1]: origin-node.service: main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start Origin Node.
    systemd[1]: Unit origin-node.service entered failed state.
    systemd[1]: origin-node.service failed.
    

    From the OpenVSwitch logs...

    systemd[1]: Starting Open vSwitch...
    systemd[1]: Started Open vSwitch.
    systemd[1]: Stopping Open vSwitch...
    systemd[1]: Starting Open vSwitch...
    systemd[1]: Started Open vSwitch.
    

    From the systemd logs ...

    systemd[1]: Starting Open vSwitch Database Unit...
    systemd[1]: Starting Open vSwitch...
    systemd[1]: Started Open vSwitch.
    systemd[1]: Starting Origin Node...
    systemd[1]: origin-node.service: main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start Origin Node.
    systemd[1]: Unit origin-node.service entered failed state.
    systemd[1]: origin-node.service failed.
    systemd[1]: Started Open vSwitch Database Unit.
    systemd[1]: Starting Open vSwitch Forwarding Unit...
    systemd[1]: Started Open vSwitch Forwarding Unit.
    systemd[1]: origin-node.service holdoff time over, scheduling restart.
    systemd[1]: Starting Origin Node...
    systemd[1]: Started Origin Node.
    systemd[1]: Stopping Origin Node...
    systemd[1]: Stopping Open vSwitch Forwarding Unit...
    systemd[1]: Stopping Open vSwitch...
    systemd[1]: Starting Open vSwitch...
    systemd[1]: Started Open vSwitch.
    systemd[1]: Starting Origin Node...
    systemd[1]: Stopping Open vSwitch Database Unit...
    systemd[1]: Starting Open vSwitch Database Unit...
    systemd[1]: origin-node.service: main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start Origin Node.
    systemd[1]: Unit origin-node.service entered failed state.
    systemd[1]: origin-node.service failed.
    systemd[1]: Started Open vSwitch Database Unit.
    systemd[1]: Starting Open vSwitch Forwarding Unit...
    systemd[1]: Started Open vSwitch Forwarding Unit.
    

    No AVC denials as before. Maybe we should be looking for some other type of denial? This is weird ...

  16. stevekuznetsov commented on Mar 13, 2017

    @stevekuznetsov
    Contributor

    @knobunc two questions please:

    1. have you ever seen this before

      ovs-vsctl[14598]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --if-exists del-br br0 -- add-br br0 -- set Bridge br0 fail-mode=secure protocols=OpenFlow13
      ovs-vsctl[14598]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
      
    2. what journalctl --unit would we need to get the logs from ovs-vsctl if not openvswitch.service? The OpenVSwitch logs above look really empty... maybe we are not starting it with the correct logging level in the installer?

  17. stevekuznetsov commented on Mar 13, 2017

    @stevekuznetsov
    Contributor

    Hmm, I am going to add log grabs for ovs-vswitchd.service and ovsdb-server.service but I think we need to bump the log levels there if possible @sdodson -- they are emitting basically nothing even on a working system.

  18. sdodson commented on Mar 14, 2017

    @sdodson
    Member

    I don't think those services exist, perhaps openvswitch-nonetwork.service Can I run this over and over again outside of CI?

  19. stevekuznetsov commented on Mar 14, 2017

    @stevekuznetsov
    Contributor

    @sdodson those are listed as dependencies in the systemd tree and exist on systems with openvswitch installed -- what do you mean?

  20. stevekuznetsov commented on Mar 14, 2017

    @stevekuznetsov
    Contributor

    Looks like we should be on 2.6, anyway -- I'll get that configured on the test VMs and we can re-visit this if it occurs again.

  21. sdodson commented on Mar 15, 2017

    @sdodson
    Member

    Looks like this is happening because openvswitch.service does not enforce that ovsdb-server.service and ovs-vswitchd.service are started prior to marking openvswitch.service as active.

    https://bugzilla.redhat.com/show_bug.cgi?id=1432637

  22. sdodson commented on Mar 15, 2017

    @sdodson
    Member

    Workarounds
    master #13370
    release-1.5 #13371
    containerized installs openshift/openshift-ansible#3674

  23. stevekuznetsov commented on Apr 12, 2017

    @stevekuznetsov
    Contributor

    The newer issue was actually #13713 -- resolved as of right now, newer packages for 1.5 Origin are out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/infrastructurekind/test-flakepriority/P1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions