[From nobody Wed Jul  8 12:23:06 2026
Received: (at submit) by bugs.debian.org; 28 Jun 2026 15:50:31 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-122.5 required=4.0 tests=ALL_TRUSTED,BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
 DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,FROMDEVELOPER,HAS_PACKAGE,
 SPF_HELO_NONE,SPF_PASS,USER_IN_DKIM_WELCOMELIST,XMAILER_REPORTBUG
 autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 187; hammy, 150; neutral, 262; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;wrar@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:46970)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;wrar@debian.org&gt;) id 1wdrmB-00GXFq-0K
 for submit@bugs.debian.org; Sun, 28 Jun 2026 15:50:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Date:Message-ID:Subject:To:From:
 Content-Transfer-Encoding:MIME-Version:Content-Type:Reply-To:Cc:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=M9RIZeLWXmnY3/CW3YZzsgzskaSV7U4oQuckbt5gqVw=; b=AeJl6lg3zpO+lF0A1PfieCABT4
 ieMlp/m8F2ihQtiGW9bat+qXdJ33H7aYWn7ogQ2+xnhE3+G3TzN7OxxmUk0vdfvUWjdNsWu0DtwS3
 lbnXLAGHKo8jRY8y+fAITycx6pumuGBtlC7lV8U2gvgjoSvr3V2yjbjCGAT1K+3eROksgN7zaAAlP
 ZK3Z6x3QqXDn192XNrIE8nzpN0cluWzG1w+pHhGir1Sc/FZsyMqZYo1/yHKWgMRwcSwJ9qmUjc33S
 OHaRJg/Vn7kdRdItcs9/lRPUPh2a0ooMrpRBjAlAtpdn1eG9ut1u4UK4dpFwidCKaRDN/NgHS9TR1
 S3scXJUA==;
Received: from authenticated-user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;wrar@debian.org&gt;) id 1wdrm9-005cup-2D;
 Sun, 28 Jun 2026 15:50:29 +0000
Received: from [188.226.55.174] (helo=belkar.localdomain)
 by durkon.wrar.name with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.99.4)
 (envelope-from &lt;wrar@debian.org&gt;) id 1wdrm8-00000005dxQ-47p8;
 Sun, 28 Jun 2026 17:50:29 +0200
Received: by belkar.localdomain (Postfix, from userid 1000)
 id 1B5046A39203; Sun, 28 Jun 2026 20:50:28 +0500 (+05)
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Andrey Rakhmatullin &lt;wrar@debian.org&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: crmsh: autopkgtests fail: AttributeError: module 'ast' has no
 attribute 'Num'
Message-ID: &lt;178266182809.3322948.1453227559652230917.reportbug@belkar.wrar.name&gt;
X-Mailer: reportbug 13.2.0+nmu1
Date: Sun, 28 Jun 2026 20:50:28 +0500
X-Debian-User: wrar
Delivered-To: submit@bugs.debian.org

Package: crmsh
Version: 5.0.0-3
Severity: serious

=================================== FAILURES
===================================
_____________________________ test_when_expression
_____________________________

    def test_when_expression():
        &quot;&quot;&quot;
        Test when expressions
        &quot;&quot;&quot;
        def runtest(when, val):
            the_script = '''version: 2.2
    shortdesc: Test when expressions
    longdesc: See if more complicated expressions work
    parameters:
      - name: stringtest
        type: string
        shortdesc: A test string
    actions:
      - call: &quot;echo '{{stringtest}}'&quot;
        when: %s
    '''
            scrpt = scripts.load_script_string('{}_{}'.format(when, val),
the_script % when)
            assert scrpt is not None

            a1 = scripts.verify(scrpt,
                                {&quot;stringtest&quot;: val},
                                external_check=False)
            pprint(a1)
            return a1

&gt;       a1 = runtest('stringtest == &quot;balloon&quot;', &quot;balloon&quot;)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/usr/share/crmsh/tests/unittests/test_scripts.py:896:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/share/crmsh/tests/unittests/test_scripts.py:890: in runtest
    a1 = scripts.verify(scrpt,
/usr/lib/python3/dist-packages/crmsh/scripts.py:2198: in verify
    actions = _process_actions(script, params)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/scripts.py:2173: in _process_actions
    when = str(action['when']).strip()
           ^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/scripts.py:134: in __str__
    return str(minieval(inp, lenv)).lower()
               ^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/crmsh/minieval.py:370: in minieval
    return SimpleEval(env).evaluate(expr)
           ^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = &lt;crmsh.minieval.SimpleEval object at 0x7f5601729010&gt;
names = {'stringtest': 'balloon', 'nodes': None, 'dry_run': 'no', 'action':
None, ...}

    def __init__(self, names):
        &quot;&quot;&quot;
            Create the evaluator instance.  Set up valid operators (+,-, etc)
            functions (add, random, get_val, whatever) and names. &quot;&quot;&quot;

        operators = DEFAULT_OPERATORS
        names = names.copy()
        names.update(DEFAULT_NAMES)

        self.operators = operators
        self.names = names

        self.nodes = {
&gt;           ast.Num: self._eval_num,
            ^^^^^^^
            ast.Str: self._eval_str,
            ast.Name: self._eval_name,
            ast.UnaryOp: self._eval_unaryop,
            ast.BinOp: self._eval_binop,
            ast.BoolOp: self._eval_boolop,
            ast.Compare: self._eval_compare,
            ast.IfExp: self._eval_ifexp,
            ast.keyword: self._eval_keyword,
            ast.Subscript: self._eval_subscript,
            ast.Attribute: self._eval_attribute,
            ast.Index: self._eval_index,
            ast.Slice: self._eval_slice,
        }
E       AttributeError: module 'ast' has no attribute 'Num'

/usr/lib/python3/dist-packages/crmsh/minieval.py:186: AttributeError
____________________________ TestSBD.test_do_purge
_____________________________

self = &lt;unittests.test_ui_sbd.TestSBD testMethod=test_do_purge&gt;
mock_purge_sbd_from_cluster = &lt;MagicMock name='purge_sbd_from_cluster'
id='140007337183616'&gt;
mock_check_all_nodes_reachable = &lt;MagicMock name='check_all_nodes_reachable'
id='140007337193360'&gt;

    @mock.patch('crmsh.utils.check_all_nodes_reachable')
    @mock.patch('crmsh.sbd.purge_sbd_from_cluster')
    def test_do_purge(self, mock_purge_sbd_from_cluster,
mock_check_all_nodes_reachable):
        self.sbd_instance_diskbased._load_attributes = mock.Mock()
        self.sbd_instance_diskbased._service_is_active =
mock.Mock(return_value=True)
&gt;       res = self.sbd_instance_diskbased.do_purge(mock.Mock())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/usr/share/crmsh/tests/unittests/test_ui_sbd.py:579:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/crmsh/ui_sbd.py:590: in do_purge
    sbd.SBDManager.restart_cluster_if_possible()
/usr/lib/python3/dist-packages/crmsh/sbd.py:565: in restart_cluster_if_possible
    bootstrap.restart_cluster()
/usr/lib/python3/dist-packages/crmsh/bootstrap.py:2911: in restart_cluster
    utils.cluster_run_cmd(&quot;crm cluster restart&quot;)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cmd = 'crm cluster restart', node_list = []

    def cluster_run_cmd(cmd, node_list=[]):
        &quot;&quot;&quot;
        Run cmd in cluster nodes
        &quot;&quot;&quot;
        nodelist = node_list or list_cluster_nodes()
        if not nodelist:
&gt;           raise ValueError(&quot;Failed to get node list from cluster&quot;)
E           ValueError: Failed to get node list from cluster

/usr/lib/python3/dist-packages/crmsh/utils.py:1743: ValueError
----------------------------- Captured stdout call
-----------------------------
.EXT cibadmin -Q
=========================== short test summary info
============================
FAILED test_scripts.py::test_when_expression - AttributeError: module 'ast' has
no attribute 'Num'
FAILED test_ui_sbd.py::TestSBD::test_do_purge - ValueError: Failed to get node
list from cluster


-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.0.12+deb14.1-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages crmsh depends on:
ii  gawk                 1:5.3.2-1
ii  iputils-ping         3:20250605-1
pn  pacemaker-cli-utils  &lt;none&gt;
ii  python3              3.13.9-3+b1
ii  python3-dateutil     2.9.0-4
ii  python3-lxml         6.1.0-1
ii  python3-packaging    26.2-2
ii  python3-yaml         6.0.3-1

Versions of packages crmsh recommends:
pn  pacemaker  &lt;none&gt;

Versions of packages crmsh suggests:
ii  bash-completion    1:2.16.0-8
pn  cluster-glue       &lt;none&gt;
pn  csync2             &lt;none&gt;
ii  dmidecode          3.7-1
ii  fdisk              2.42.2-1
pn  ocfs2-tools        &lt;none&gt;
ii  openssh-server     1:10.3p1-5
ii  parted             3.7-1
pn  sbd                &lt;none&gt;
pn  ufw                &lt;none&gt;
ii  util-linux         2.42.2-1
ii  util-linux-extra   2.42.2-1
ii  vim-addon-manager  0.5.11
]