Repository: minio/mc

Issue #2746: mc rm does not remove a valid object
Created: 2019-04-16T17:31:37Z
Expected behavior
mc rm succeeds
Actual behavior
mc rm fails even if the file exists.
mc: <ERROR> Failed to remove `myminio/testbucket/hosts`. Target `myminio/testbucket/hosts` not found.
 (0) rm-main.go:181 cmd.removeSingle(..) Tags: [myminio/testbucket/hosts]
 Release-Tag:DEVELOPMENT.2019-04-09T17-42-42Z | Commit:66677d7c21cd | Host:backspace | OS:linux | Arch:amd64 | Lang:go1.12.1 | Mem:2.5 MB/72 MB | Heap:2.5 MB/66 MB

~ mc ls myminio/testbucket/hosts
[2019-04-16 10:26:49 PDT]  1.0GiB hosts
[2019-04-16 10:27:10 PDT]  1.0GiB hosts.1

Steps to reproduce the behavior
Just use the latest master
mc version
master
System information
Linux

Duplicate issue #2749:   mc rm  command is not working  with latest docker image minio/mc:RELEASE.2019-04-10T22-11-28Z
Created: 2019-04-17T05:41:13Z
Expected behavior
The command  mc rm  test/sanjay must delete the bucket.
Actual behavior
/ # mc rm  test/sanjay
mc: <ERROR> Failed to remove `test/sanjay`. Target `test/sanjay` not found.
/ # 

Steps to reproduce the behavior
Launch mc pod on Kubernetes environment
apiVersion: v1
kind: Pod
metadata:
  name: minioclient
  # Note that the Pod does not need to be in the same namespace as the loader.
  labels:
    app: minioclient
spec:
  containers:
  - name: minio
    #image: minio/mc:RELEASE.2018-06-09T02-18-09Z
    image: minio/mc:RELEASE.2019-04-10T22-11-28Z
    imagePullPolicy: IfNotPresent
    command: ["/test/test-minio.sh"]
    volumeMounts:
      - name: test-minio
        mountPath: "/test"
  volumes:
    - name: test-minio
      configMap:
        name: test-minio
        defaultMode: 0744
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-minio
data:
  test-minio.sh: |
    #!/bin/sh
    mc config host add myminio http://minio-ibm-minio-objectstore:9000 admin admin1234 S3v4
    #mc mb test/test
    #mc ls test/test
    sleep 3600

Logon to mc po and connect to Minio server running with
minio/minio: RELEASE.2019-04-09T01-22-30Z image
/ # mc config host add test http://rwpbjld-ibm-minio-objectstore:9000 admin admin1234 
Added `test` successfully.
/ # mc mb test/sanjay
Bucket created successfully `test/sanjay`.
/ # mc ls test/sanjay
/ # mc rm  test/sanjay
mc: <ERROR> Failed to remove `test/sanjay`. Target `test/sanjay` not found.
/ # 

mc version
root@sanjay33-ubt-master:~/test-dir/minio_test# kubectl exec -it minioclient sh 
/ # mc version 
Version: 2019-04-10T22:11:28Z
Release-tag: RELEASE.2019-04-10T22-11-28Z
Commit-id: ea469140d50b0240501963666e1de19c6d37f812
/ # 

System information
Kubernetes cluster
kubectl version 
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4+icp-ee", GitCommit:"5da3fdf4758c9bbb168d480cbda91b754e3b9b3e", GitTreeState:"clean", BuildDate:"2019-03-11T00:42:41Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4+icp-ee", GitCommit:"5da3fdf4758c9bbb168d480cbda91b754e3b9b3e", GitTreeState:"clean", BuildDate:"2019-03-11T00:42:41Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

Closing comment (2019-04-17T05:48:26Z): Duplicate of #2746