Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filesystem.py: Fix xfs growfs #55646

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@alxgu
Copy link
Contributor

commented Apr 23, 2019

xfs needs to be mounted to be expanted.

Add function to get mountpoint of filesystem. Use this mountpoint for xfs growing.

SUMMARY

xfs growfs needs to be executed on a mountpoint. That will be enforced now by xfsprogs-4.12.
https://bugzilla.redhat.com/show_bug.cgi?id=1477192

Fixes #33979

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

filesystem.py

ADDITIONAL INFORMATION

before:

server1| FAILED! => {
    "changed": false,
    "cmd": "/usr/sbin/xfs_growfs -n /dev/vg00/work.tmp",
    "msg": "xfs_growfs: /dev/vg00/work.tmp is not a mounted XFS filesystem",
    "rc": 1,
    "stderr": "xfs_growfs: /dev/vg00/work.tmp is not a mounted XFS filesystem\n",
    "stderr_lines": [
        "xfs_growfs: /dev/vg00/work.tmp is not a mounted XFS filesystem"
    ],
    "stdout": "",
    "stdout_lines": []
}

after:

server1| SUCCESS => {
    "changed": false,
    "msg": "XFS filesystem is using the whole device /dev/vg00/work.tmp"
}

or

server1| SUCCESS => {
    "changed": true,
    "msg": "meta-data=/dev/mapper/vg00-work.tmp isize=512    agcount=4, agsize=32768 blks\n         =                       sectsz=512   attr=2, projid32bit=1\n         =                       crc=1        finobt=1 spinodes=0 rmapbt=0\n         =                       reflink=0\ndata     =                       bsize=4096   blocks=131072, imaxpct=25\n         =                       sunit=0      swidth=0 blks\nnaming   =version 2              bsize=4096   ascii-ci=0 ftype=1\nlog      =internal               bsize=4096   blocks=855, version=2\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\ndata blocks changed from 131072 to 134144\n"
}

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

@pilou-

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

This error occurs when there isn't any mountpoint:

fatal: [testhost]: FAILED! => {
  "changed": false,
  "cmd": "/usr/sbin/xfs_growfs -n None",
  "msg": "xfs_growfs: path resolution failed for None: No such file or directory",
  "rc": 1,
  "stderr": "xfs_growfs: path resolution failed for None: No such file or directory\n",
  "stderr_lines": [
    "xfs_growfs: path resolution failed for None: No such file or directory"
  ],
 "stdout": "",
  "stdout_lines": []
}

/usr/sbin/xfs_growfs -n None must not be executed, an error must be raised earlier.

@ansibot ansibot removed the needs_triage label Apr 23, 2019

@alxgu alxgu force-pushed the alxgu:xfs_growfs branch from 9b16523 to c5b2a3f Apr 24, 2019

@alxgu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2019

@pilou- fixed
srv1| FAILED! => { "changed": false, "msg": "/dev/vg00/work.tmp needs to be mounted for xfs operations" }

filesystem.py: Fix xfs growfs
xfs needs to be mounted to be expanted.

Add function to get mountpoint of filesystem.

* Fail if xfs filesystem is not mounted

@alxgu alxgu force-pushed the alxgu:xfs_growfs branch from c5b2a3f to 99e9597 Apr 24, 2019

@alxgu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 29, 2019

@trammel Could you test the PR?

@ansibot ansibot added the stale_ci label May 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.