Open devopsInterviews opened 5 months ago
@xing-yang Could you please help to take a look at this issue?
@blackpiglet @xing-yang We would really appreciate any help.
The vSphere plugin issue needs expertise from @xing-yang.
I have one suggestion too. Please remove the CSI plugin from the environment, although this may not be the cause of your issue.
@blackpiglet We already tried to remove the CSI plugin but we still faced the same issue. @xing-yang If you have any suggestions it would be great.
+1
We have further investigation: There is a difference between running it on Windows and Linux hosts, it seems that the issue occurs only on Windows (Running Minio as exe) To reproduce, we used the latest versions of the Velero plugin and Minio, and here are the results: On linux:
pip3 install minio
echo hello > file.txt
#Create a "velero" bucket in minio
Run the following script
from minio import Minio
from minio.error import S3Error
def main():
# Initialize minio client object.
minioClient = Minio(
"localhost:9000",
access_key="minioadmin",
secret_key="minioadmin",
secure=False
)
# Define the object name with unsupported characters.
object_name = "ivd:90197568-1d73-4fce-88569-dfbe4b553a05:2d9093bb-35e07-4e19-ab94-ae97e614a2dc"
bucket_name = "velero"
file_path = "file.txt"
content_type = "application/text"
# Upload the file
try:
minioClient.fput_object(bucket_name, object_name, file_path, content_type=content_type)
print(f"Successfully uploaded {object_name} to bucket {bucket_name}")
except S3Error as err:
print(f"Error occurred: {err}")
if __name__ == "__main__":
main()
The upload passed successfully:
Successfully uploaded ivd:90197568-1d73-4fce-88569-dfbe4b553a05:2d9093bb-35e07-4e19-ab94-ae97e614a2dc to bucket velero
Try the same on a Windows host: Install minio as exe (https://dl.min.io/server/minio/release/windows-amd64/minio.exe) and run the script:
C:\minio>C:\minio\myscript.py
Error occurred: S3 operation failed; code: XMinioInvalidObjectName, message: Object name contains unsupported characters., resource: /velero/ivd:90197568-1d73-4fce-88569-dfbe4b553a05:2d9093bb-35e07-4e19-ab94-ae97e614a2dc, request_id: 17DDCC6B9550F1A0, host_id: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8, bucket_name: velero, object_name: ivd:90197568-1d73-4fce-88569-dfbe4b553a05:2d9093bb-35e07-4e19-ab94-ae97e614a2dc
It's probably an issue with minio's windows flavor because of a limitation in the NTFS file system (which doesn't support colon ':' in filenames):
Here is the code that verifies it in Minio: https://github.com/minio/minio/blob/f736702da8f3fe0967f9a25bab6c8d7e27d002a4/cmd/object-api-utils.go#L197-L223
@xing-yang @blackpiglet Do you have any estimation for this bug? Because currently we can not use Velero and can not backup our data at all..
@devopsInterviews Since you use the vSphere plugin, please create a downstream ticket to trace this issue. There is more guarantee of engineer effort for the downstream ticket. The upstream OSS issue works in a best-effort way if the engineer is busy with other tasks.
@blackpiglet We did create a ticket in the Vsphere plugin repo. On the same day we opened it here. Unfortunately, no one even looked on the ticket there.. The link to the ticket:
https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/586
Not sure whether you are using a commercial version of the vSphere k8s environment, e.g. TKGs, TKGm, or TKGI. If you use one of them, you can create a ticket to escalate the issue.
@blackpiglet
Currently we do not use any commercial version and we depend on the open source community. Is the only way to promote Windows support is via commercial version? Or do you believe we can get the help without that.
@devopsInterviews Because your issue needs support from the vSphere plugin side, I mark this issue as a duplicate of https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/586 for now.
@blackpiglet I'm afraid that marking this issue as duplicate will just ensure that no one will look on this ticket. Is there anyone else you know that can help us with this?
https://github.com/vmware-tanzu/velero-plugin-for-vsphere I'm also not sure. As you may know, there was an organizational change in VMware after the Broadcom acquisition. As a result, there are some impacts on the vSphere plugin repository. I am also unsure whether the old maintainers are still working on it.
I suggest checking that the repository's active contributor.
Thank you @blackpiglet.
@dsu-igeek @xing-yang @lipingxue
It looks like you are some of the active maintainers of the repo. I would really appreciate any answer from you.
Any update? thoughts?
The same problem is occurring to me as well. I have a Minio service on a Windows server that functions as a backup server. I encountered the same issue with backing up process with Velero and Vsphere plugin . Any update from your side to handle this issue and support Windows machine in the vSphere plugin?
We have not done any qualifications on windows so it is not officially supported yet. I'll have to add this to our backlog.
Hi @xing-yang, thanks for the answer. Is this something that can be prioritised? We know the exact place in the code that causes that. It's not a big change. Just an unsupported character you are using in the volume name. Currently it blocks us and others from backing up our production environments.
@xing-yang , Any update ? The Velero solution would be ideal for our production solution, yet we have a Windows server that cannot be replaced with Linux OS.
Could you please let me know when you intend to start working on this bug?
Hi all, We are experiencing issues with backing up and restoring data on our vanilla Kubernetes cluster running on vSphere 7.3 to a remote MinIO S3 server using Velero, the vSphere plugin, and the AWS plugin. We are seeking your assistance to resolve this issue.
Environment Details: Kubernetes Version: Vanilla Kubernetes Cluster (1.26.1) vSphere Version: 7.3 Backup Solution: Velero velero version: 1.13.2 Plugins Used: velero/velero-plugin-for-aws 1.6.1 vsphereveleroplugin/velero-plugin-for-vsphere 1.4.2 velero/velero-plugin-for-csi 0.7.1
Object Storage: MinIO S3 on a remote server Current Setup: We have deployed Velero with the following pods in the velero namespace:
Issue Details: Backup Process: We are able to initiate backups using Velero, and the metadata (e.g., namespaces, services, pods, PVC definitions) appears to be backed up correctly. Restore Process: During the restore process, all the Kubernetes objects (services, pods, PVCs, etc.) are restored successfully. However, the actual data inside the PVCs is not restored. The PVCs remain empty.
Observations:
Metadata Backup: The metadata is correctly migrated and visible after restoration. Data Absence: The data within the PVCs is not restored, resulting in empty PVCs even though the PVC objects themselves are recreated. Pod Logs: We have examined the logs of the datamgr-for-vsphere-plugin pods and observed errors related to invalid object names during the upload process to MinIO. Log Excerpt from datamgr-for-vsphere-plugin Pod:
Log Excerpt from Restore Command:
Our Understanding of the Backup and Restore Process: Backup Process:
Velero initiates a backup process, capturing both metadata and data snapshots. The metadata is successfully backed up and stored in MinIO. Data snapshots (IVDs) are taken but fail to upload to MinIO due to invalid object names. Restore Process:
Velero restores the metadata correctly. Attempts to restore data from MinIO fail, leading to empty PVCs.
Installation Command: Here is the command we used to install Velero:
We seek your guidance on the following points:
Resolution for Invalid Object Names: How can we ensure that object names generated during the snapshot process are valid and compatible with MinIO? We don't have control over them as far as I know. Ensuring Data Backup and Restore: Steps we can take to ensure that both metadata and data are correctly backed up and restored. We appreciate any insights or recommendations you can provide to help us resolve this issue.
Thank you for your support.
Best regards !