Closed cgallay closed 6 months ago
/dev/sdl 974M 24K 958M 1% /var/lib/www/html
I encountered this before and I switched to another openstack it works fine so I think it might be related to the cinder storage backend , from CPO CSI perspective it has done the job ..
@jichenjc what else could be done here to debug?
https://github.com/kubernetes/cloud-provider-openstack/issues/1437 this is the history, I think maybe we can check cinder logs
I remember I have a company openstack with it the resize failed, then I created a devstack and it works fine maybe need check cinder logs to see anything related to resize volume functions
@jichenjc setting log info to 5 gave this with rescan:
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.456381 1 utils.go:91] [ID:333] GRPC call: /csi.v1.Node/NodeGetCapabilities
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.456396 1 utils.go:92] [ID:333] GRPC request: {}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.456431 1 nodeserver.go:481] NodeGetCapabilities called with req: &csi.NodeGetCapabilitiesRequest{XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.456440 1 utils.go:97] [ID:333] GRPC response: {"capabilities":[{"Type":{"Rpc":{"type":1}}},{"Type":{"Rpc":{"type":3}}},{"Type":{"Rpc":{"type":2}}}]}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.456996 1 utils.go:91] [ID:334] GRPC call: /csi.v1.Node/NodeGetCapabilities
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.457006 1 utils.go:92] [ID:334] GRPC request: {}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.457039 1 nodeserver.go:481] NodeGetCapabilities called with req: &csi.NodeGetCapabilitiesRequest{XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.457049 1 utils.go:97] [ID:334] GRPC response: {"capabilities":[{"Type":{"Rpc":{"type":1}}},{"Type":{"Rpc":{"type":3}}},{"Type":{"Rpc":{"type":2}}}]}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.458077 1 utils.go:91] [ID:335] GRPC call: /csi.v1.Node/NodeExpandVolume
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.458085 1 utils.go:92] [ID:335] GRPC request: {"capacity_range":{"required_bytes":2147483648},"staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/cinder.csi.openstack.org/fc6548b4538f9ebf615ca2947daf73ded3977fa9575832e0d80fb48f772e9eef/globalmount","volume_capability":{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}},"volume_id":"d4dbf429-c3a5-4c03-b1aa-71741b6399e1","volume_path":"/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount"}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.458147 1 nodeserver.go:533] NodeExpandVolume: called with args {"capacity_range":{"required_bytes":2147483648},"staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/cinder.csi.openstack.org/fc6548b4538f9ebf615ca2947daf73ded3977fa9575832e0d80fb48f772e9eef/globalmount","volume_capability":{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}},"volume_id":"d4dbf429-c3a5-4c03-b1aa-71741b6399e1","volume_path":"/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount"}
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.528023 1 blockdevice_linux.go:73] Detecting "/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount" volume size
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.528059 1 blockdevice_linux.go:79] Detected "/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount" volume size: 1073741824
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.528143 1 blockdevice_linux.go:108] Resolved block device path from "/dev/sde" to "/sys/devices/pci0000:00/0000:00:04.0/virtio1/host2/target2:0:0/2:0:0:4/rescan"
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.528152 1 blockdevice_linux.go:109] Rescanning "/dev/sde" block device geometry
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.547180 1 blockdevice_linux.go:73] Detecting "/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount" volume size
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin I1221 02:28:11.547283 1 blockdevice_linux.go:79] Detected "/var/lib/kubelet/pods/16a9e8ec-c374-4415-bf2a-0d10fb6850d4/volumes/kubernetes.io~csi/pvc-a68e8ee6-68ac-43b5-9a44-e98f9b38ba01/mount" volume size: 1073741824
openstack-cinder-csi-nodeplugin-lxl8f cinder-csi-plugin E1221 02:28:11.547297 1 utils.go:95] [ID:335] GRPC error: rpc error: code = Internal desc = Could not verify "d4dbf429-c3a5-4c03-b1aa-71741b6399e1" volume size: current volume size is less than expected one: 1073741824 < 2147483648
And without rescan:
openstack-cinder-csi-nodeplugin-g7tj4 cinder-csi-plugin I1221 02:42:43.407532 1 mount_linux.go:563] Attempting to determine if disk "/dev/sdc" is formatted using blkid with args: ([-p -s TYPE -s PTTYPE -o export /dev/sdc])
openstack-cinder-csi-nodeplugin-g7tj4 cinder-csi-plugin I1221 02:42:43.408921 1 mount_linux.go:566] Output: "DEVNAME=/dev/sdc\nTYPE=ext4\n"
openstack-cinder-csi-nodeplugin-g7tj4 cinder-csi-plugin I1221 02:42:43.408943 1 resizefs_linux.go:56] ResizeFS.Resize - Expanding mounted volume /dev/sdc
openstack-cinder-csi-nodeplugin-g7tj4 cinder-csi-plugin I1221 02:42:43.427309 1 resizefs_linux.go:71] Device /dev/sdc resized successfully
Is there other logs somewhere? Maybe in the OS? Is there a know workaround?
seems the volume does NOT extend due to some reason I would first check whether I can extend my volume at openstack level (not using CAPO at all)
e.g try this command on your volume directly and see whether it's report like error_extending
and check the volume
is really resized in file system ,as CPO rely on cinder
if above doesn't work, check cinder log like cinder-volume.log in openstack and it should give us more info
# cinder extend
usage: cinder extend <volume> <new_size>
error: the following arguments are required: <volume>, <new_size>
Try 'cinder help extend' for more information.
I tried devstack and it works fine , it takes around 2-3 min to become 2G in disk
root@jitest43:~# cinder list
+--------------------------------------+--------+------------------------------------------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------------------------------------------+------+-------------+----------+--------------------------------------+
| 93cc2adb-f5f8-415b-b561-e2ba8dc44659 | in-use | pvc-abd42a61-c8f8-42aa-84ed-53c5cef39660 | 2 | lvmdriver-1 | false | 07b0a955-a979-47cd-8aea-c19fe491e319 |
+--------------------------------------+--------+------------------------------------------+------+-------------+----------+--------------------------------------+
root@jitest43:~# kubectl exec nginx -- df -h /var/lib/www/html
Filesystem Size Used Avail Use% Mounted on
/dev/vdb 974M 24K 958M 1% /var/lib/www/html
root@jitest43:~# kubectl exec nginx -- df -h /var/lib/www/html
Filesystem Size Used Avail Use% Mounted on
/dev/vdb 2.0G 24K 2.0G 1% /var/lib/www/html
@jichenjc thanks for checking and sorry for the delayed answer. I was verifying with our OpenStack provider and it took some time to solve the issue over the Christmas break. They changed some settings (not aware of which) and the issue was remediated today. For future reference, users check under the volume "messages" tab where the OpenStack show if there is any potential internal error:
ok, I use CLI mostly ,in such case, guess cinder volume show
should help us in getting same info to the UI
anyway, I Think we are good now so close this issue, feel free to reopen
@zifeo Hi, I'm facing the exact same issue in my setup as well. But couldn't find any messages for the specific volume that's causing an issue. Would you be able to tell me what sort of settings need to be changed in OpenStack to rectify this?
@kpauljoseph I am sadly only an OpenStack user, not an admin and thus have no idea how the provider solved that issue.
Hi @zifeo,
I was trying to track the openstack configs required for this and correlated the outputs of $ openstack volume show
Could you please run the above command on any of your pvc linked volumes on the setup that the openstack admins corrected to resolve the issue and let me know if you're able to see any of the lines I mentioned above?
I had a look at your output from earlier on in this thread and noticed these fields weren't present and I assume that output was from before it got resolved.
Would be of great help. Thanks.
@kpauljoseph Sure, however running the command on our volumes does not output those attributes, we only have os-vol-tenant-attr:tenant_id
set, no mig-status at all.
reopen this for further discussion
This is probably related to Cinder Bug https://bugs.launchpad.net/charm-cinder/+bug/1939389/comments/35
This should be limited to live/online resizing a disk.
From comment #35
.
This is because if the [nova] section in the cinder.conf is missing, the api request to the nova-api from the cinder is executed as the user who initiated the cinder cli call who does not have privileges to execute 'volume-extend'.
Sean Schneeweiss sean.schneeweiss@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, Provider Information
thanks for sharing, that's charm which should be some openstack package method so not all openstack distro has this problem but worthy check of everyone report such problem due to code in cinder like this :
it expects NOVA_GROUP provide some input so it's eligible to send API request to nova side to avoid the 403 issue
if privileged_user and CONF[NOVA_GROUP].auth_type:
LOG.debug('Creating Keystone auth plugin from conf')
n_auth = ks_loading.load_auth_from_conf_options(CONF, NOVA_GROUP)
else:
if CONF[NOVA_GROUP].token_auth_url:
url = CONF[NOVA_GROUP].token_auth_url
else:
url = _get_identity_endpoint_from_sc(context)
LOG.debug('Creating Keystone token plugin using URL: %s', url)
n_auth = identity.Token(auth_url=url,
token=context.auth_token,
project_name=context.project_name,
project_domain_id=context.project_domain_id)
if CONF.auth_strategy == 'keystone':
n_auth = service_auth.get_auth_plugin(context, auth=n_auth)
keystone_session = ks_loading.load_session_from_conf_options(
CONF,
NOVA_GROUP,
auth=n_auth)
c = nova_client.Client(
api_versions.APIVersion(api_version or NOVA_API_VERSION),
session=keystone_session,
insecure=CONF[NOVA_GROUP].insecure,
timeout=timeout,
region_name=CONF[NOVA_GROUP].region_name,
endpoint_type=CONF[NOVA_GROUP].interface,
cacert=CONF[NOVA_GROUP].cafile,
global_request_id=context.global_id,
extensions=nova_extensions)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug
What happened: Expanding a PVC did not increase the filesystem size. All logs seem green but actual size within the pod stays unchanged.
What you expected to happen: Increase filesystem from 1Gi to 2Gi for the test pod below.
How to reproduce it: Helm chart 2.3.0
Storage class:
Following the example:
Resize: 1Gi to 2Gi
Same result before and after:
Controller plugin:
Node plugin:
Events:
kubectl:
OpenStack:
Anything else we need to know?: I was unable to find a workaround, that would be critical to find. What other logs/debug steps can I try?
Environment: