saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.23k stars 5.49k forks source link

[BUG] disk.format - Passed invalid arguments: format_() got an unexpected keyword argument '__pub_fun' #59457

Open podwhitehawk opened 3 years ago

podwhitehawk commented 3 years ago

Description disk.format used to work in 2019.2.3 we used before, but stopped working since we migrated to 3002.2.

Setup clean ubuntu (server) 20.04.2 salt 3002.2 (also doesn't work for 3002 and 3001.4, but works in 3000.6)

Steps to Reproduce the behavior as simple as calling salt-call disk.format /dev/sdX1 --local

Expected behavior partition have to be formatted successfully

Screenshots

root@ubuntu20042:~# salt-call disk.format /dev/sdb1 --local

Passed invalid arguments: format_() got an unexpected keyword argument '__pub_fun'.

Usage:

    Format a filesystem onto a device

    .. versionadded:: 2016.11.0

    device
        The device in which to create the new filesystem

    fs_type
        The type of filesystem to create

    inode_size
        Size of the inodes

        This option is only enabled for ext and xfs filesystems

    lazy_itable_init
        If enabled and the uninit_bg feature is enabled, the inode table will
        not be fully initialized by mke2fs.  This speeds up filesystem
        initialization noticeably, but it requires the kernel to finish
        initializing the filesystem  in  the  background  when  the filesystem
        is first mounted.  If the option value is omitted, it defaults to 1 to
        enable lazy inode table zeroing.

        This option is only enabled for ext filesystems

    fat
        FAT size option. Can be 12, 16 or 32, and can only be used on
        fat or vfat filesystems.

    force
        Force mke2fs to create a filesystem, even if the specified device is
        not a partition on a block special device. This option is only enabled
        for ext and xfs filesystems

        This option is dangerous, use it with caution.

    CLI Example:

    .. code-block:: bash

        salt '*' disk.format /dev/sdX1

Versions Report salt is installed, using default configuration.

# salt --versions-report
Salt Version:
          Salt: 3002.2

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.10.1
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.9.9
        pygit2: Not Installed
        Python: 3.8.5 (default, Jul 28 2020, 12:59:40)
  python-gnupg: Not Installed
        PyYAML: 5.3.1
         PyZMQ: 22.0.2
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: ubuntu 20.04 focal
        locale: utf-8
       machine: x86_64
       release: 5.4.0-65-generic
        system: Linux
       version: Ubuntu 20.04 focal

Additional context easily replaceable with cmd.run mkfs.ext4 /dev/sdX1 for those who looking for temporary workaround.

welcome[bot] commented 3 years ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at core@saltstack.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

Bacon-Unlimited commented 1 year ago

👍 Having this problem with salt 3002.8 agents. Is this corrected in other salt agent versions?