Skip to content

Ironic dbsync failing on bootstrap node #753

Closed

Description

@derekhiggins

dbsync seems to be failing on the bootstrap node (in the ironic-conductor container)

2019-08-20 15:25:01.563 28 ERROR ironic InternalError: (pymysql.err.InternalError) (1, u'Can't create/write to file '/var/tmp/#sql_b2_0.MAI' (Errcode: 2 "No such file or directory")') [SQL: 'DESCRIBE alembic_version'] (Background on this error at: http://sqlalche.me/e/2j85)

full log here
https://goodsquishy.com/upload/5071aed100396b1434ba

Activity

  1. derekhiggins commented on Aug 20, 2019

    @derekhiggins
    CollaboratorAuthor

    Also can't exec into the mariadb container
    [root@localhost core]# podman exec -it mariadb bash
    exec failed: JSON specification file config.json not found
    Error: exit status 1
    [root@localhost core]#

  2. hardys commented on Aug 20, 2019

    @hardys

    Hmm I've seen some similar issues before but assumed it was a race where mariadb wasn't yet up, e.g metal3-io/ironic-image#88 should fix it.

    The config.json not found error looks suspicious, like podman just failed to even try starting mariadb.

    Does restarting ironic.service fix it?

  3. derekhiggins commented on Aug 20, 2019

    @derekhiggins
    CollaboratorAuthor

    Hmm I've seen some similar issues before but assumed it was a race where mariadb wasn't yet up, e.g metal3-io/ironic-image#88 should fix it.

    I'm stuck in this loop

    The config.json not found error looks suspicious, like podman just failed to even try starting mariadb.

    Does restarting ironic.service fix it?

    yes after the ironic.service restart the dbsync works

  4. markmc commented on Aug 20, 2019

    @markmc
    Contributor

    I saw this too yesterday - commands like podman inspect didn't work (e.g. unknown container) on the mariadb container. Very strange. Didn't reproduce when I restarted the install.

  5. hardys commented on Aug 20, 2019

    @hardys

    I saw this too yesterday - commands like podman inspect didn't work (e.g. unknown container) on the mariadb container. Very strange. Didn't reproduce when I restarted the install.

    Hmm, I had a lot of problems similar to that a while back, and it was due to bugs in the (pretty old) version of podman/libpod we had in the RHCOS image at that time - it got bumped via https://bugzilla.redhat.com/show_bug.cgi?id=1724660 and things have been working much better since.

  6. derekhiggins commented on Aug 20, 2019

    @derekhiggins
    CollaboratorAuthor

    yes after the ironic.service restart the dbsync works

    Hrm - what state is mariadb during this time?

    The container was running but ironic couldn't use it, I'll see if I can get more if I see if again

    I'm wondering why if it's failed systemd doesn't restart all-the-containers when we exit startironic.sh here:

    the container was still running so we didn't exit.

    https://github.com/openshift/installer/blob/master/data/data/bootstrap/baremetal/files/usr/local/bin/startironic.sh.template#L116

    https://github.com/openshift/installer/blob/master/data/data/bootstrap/baremetal/systemd/units/ironic.service#L11

  7. hardys commented on Aug 20, 2019

    @hardys

    the container was still running so we didn't exit.

    Interesting - FWIW I did look at using podman healthcheck run instead, but the way we have the Dockerfiles defined that doesn't currently work.

  8. hardys commented on Aug 22, 2019

    @hardys

    I pushed openshift/installer#2249 which aims to help when podman ps shows a container but other commands e.g podman inspect and podman exec fail - @derekhiggins does that help in this case?

    Unfortunately I've not been able to reproduce this myself, but looking at an env with a similar issue yesterday from @dantrainor I suspect this is flaky libpod issues again, hopefully the workaround in the installer allows us to automatically restart the service via systemd to recover though, pending better understanding of the actual root-cause.

  9. e-minguez commented on Aug 23, 2019

    @e-minguez
    Contributor

    Just in case and meanwhile the fixes are pushed to the images, I've been able to workaround it by restarting the running containers in the bootstrap VM as sudo podman rm $(sudo podman ps -q)

  10. hardys commented on Aug 27, 2019

    @hardys

    Just in case and meanwhile the fixes are pushed to the images, I've been able to workaround it by restarting the running containers in the bootstrap VM as sudo podman rm $(sudo podman ps -q)

    Deleting all the containers may not be safe, it's a better idea to systemd restart ironic.service, or apply openshift/installer#2249 which results in an automated restart

  11. hardys commented on Aug 28, 2019

    @hardys

    openshift/installer#2249 landed so this can now be closed I think

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions