Uploaded image for project: 'MariaDB Foundation Development'
  1. MariaDB Foundation Development
  2. MDBF-972

Master Global Lock - check is not based on worker_base_name

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • BB V1.02
    • BB V1.03
    • Buildbot
    • None

    Description

      Currently locks.py doesn't work in BuildBot because the script is checking if the runtime worker_name is in LOCKS dictionary by the full name of the worker which is composed by a worker_base + OS.

      Examples:

      • runtime worker_name: s390x-bbw4-docker-ubuntu-2204
      • worker_name (base) in worker_locks.yaml: s390x-bbw4-docker

      Bug:

      Playground setup:

      • restrict s390x master to use only 1 worker: s390x-bbw1
      • the s390x-bbw1-docker lock is set to maxCounts = 1 in worker_locks.yaml
      • trigger 6 s390x builders

      Eventually all builders will start on s390x-bbw1 roughly at the same time << preparing worker status disappears in just a few seconds when container is up >> which is wrong and doesn't acquire any lock.

      Fix

      In the fixed version, see Pull request in comment, we do the opposite, check if the base name is in the runtime worker_name string.

      Tested this scenario already in buildbot.dev.mariadb.org and it works.

      In this setup:

      • restrict s390x master to use only 1 worker: s390x-bbw1
      • the s390x-bbw1-docker lock is set to maxCount = 1 worker_locks.yaml
      • trigger 6 s390x builders
      • check that 1 builder is running and the rest of them are waiting on the lock to be released

      Tested also the same scenario above with maxCount=2 for s390x-bbw1 and it works. See screenshot below:

      Attachments

        1. image-2025-02-14-11-36-29-292.png
          image-2025-02-14-11-36-29-292.png
          231 kB
        2. image-2025-02-14-11-41-05-592.png
          image-2025-02-14-11-41-05-592.png
          174 kB
        3. maxcount2.png
          maxcount2.png
          135 kB
        4. case1 - 1.png
          case1 - 1.png
          66 kB
        5. case 1 -2.png
          case 1 -2.png
          43 kB
        6. case 2 1.png
          case 2 1.png
          79 kB
        7. screenshot-1.png
          screenshot-1.png
          97 kB
        8. screenshot-2.png
          screenshot-2.png
          99 kB
        9. screenshot-3.png
          screenshot-3.png
          92 kB

        Issue Links

          Activity

            People

              rvarzaru Varzaru Razvan-Liviu
              rvarzaru Varzaru Razvan-Liviu
              Vicențiu Ciorbaru Vicențiu Ciorbaru
              Varzaru Razvan-Liviu Varzaru Razvan-Liviu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.25d Original Estimate - 0.25d
                  0.25d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h
                  3h