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

add init container for sanity checks #255

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

kerneltime
Copy link
Contributor

@kerneltime kerneltime commented Aug 13, 2020

During testing, we suspect an edge case where the volume mount might not be ready before minio starts up. Adding these init containers to ensure that volumes and DNS names are ready.

Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This somehow seems to interfere with args for MinIO Server. MinIO pods are not starting after initcontainers are done.

$ kubectl get pods
NAME             READY   STATUS             RESTARTS   AGE
minio-zone-0-0   0/1     CrashLoopBackOff   7          14m
minio-zone-0-1   0/1     CrashLoopBackOff   7          14m
minio-zone-0-2   0/1     CrashLoopBackOff   7          14m
minio-zone-0-3   0/1     CrashLoopBackOff   7          14m
$ kubectl logs minio-zone-0-0
NAME:
  minio server - start object storage server

USAGE:
  minio server [FLAGS] DIR1 [DIR2..]
  minio server [FLAGS] DIR{1...64}
  minio server [FLAGS] DIR{1...64} DIR{65...128}

DIR:
  DIR points to a directory on a filesystem. When you want to combine
  multiple drives into a single large system, pass one directory per
  filesystem separated by space. You may also use a '...' convention
  to abbreviate the directory arguments. Remote directories in a
  distributed setup are encoded as HTTP(s) URIs.

FLAGS:
  --address value              bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default: ":9000")
  --certs-dir value, -S value  path to certs directory (default: "/root/.minio/certs")
  --quiet                      disable startup information
  --anonymous                  hide sensitive information from logging
  --json                       output server logs and startup information in json format
  --help, -h                   show help
  
EXAMPLES:
  1. Start minio server on "/home/shared" directory.
     $ minio server /home/shared

  2. Start single node server with 64 local drives "/mnt/data1" to "/mnt/data64".
     $ minio server /mnt/data{1...64}

  3. Start distributed minio server on an 32 node setup with 32 drives each, run following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...32}.example.com/mnt/export{1...32}

  4. Start distributed minio server in an expanded setup, run the following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...16}.example.com/mnt/export{1...32} \
            http://node{17...64}.example.com/mnt/export{1...64}

@kerneltime
Copy link
Contributor Author

Which deployment did you use?

This somehow seems to interfere with args for MinIO Server. MinIO pods are not starting after initcontainers are done.

$ kubectl get pods
NAME             READY   STATUS             RESTARTS   AGE
minio-zone-0-0   0/1     CrashLoopBackOff   7          14m
minio-zone-0-1   0/1     CrashLoopBackOff   7          14m
minio-zone-0-2   0/1     CrashLoopBackOff   7          14m
minio-zone-0-3   0/1     CrashLoopBackOff   7          14m
$ kubectl logs minio-zone-0-0
NAME:
  minio server - start object storage server

USAGE:
  minio server [FLAGS] DIR1 [DIR2..]
  minio server [FLAGS] DIR{1...64}
  minio server [FLAGS] DIR{1...64} DIR{65...128}

DIR:
  DIR points to a directory on a filesystem. When you want to combine
  multiple drives into a single large system, pass one directory per
  filesystem separated by space. You may also use a '...' convention
  to abbreviate the directory arguments. Remote directories in a
  distributed setup are encoded as HTTP(s) URIs.

FLAGS:
  --address value              bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default: ":9000")
  --certs-dir value, -S value  path to certs directory (default: "/root/.minio/certs")
  --quiet                      disable startup information
  --anonymous                  hide sensitive information from logging
  --json                       output server logs and startup information in json format
  --help, -h                   show help
  
EXAMPLES:
  1. Start minio server on "/home/shared" directory.
     $ minio server /home/shared

  2. Start single node server with 64 local drives "/mnt/data1" to "/mnt/data64".
     $ minio server /mnt/data{1...64}

  3. Start distributed minio server on an 32 node setup with 32 drives each, run following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...32}.example.com/mnt/export{1...32}

  4. Start distributed minio server in an expanded setup, run the following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...16}.example.com/mnt/export{1...32} \
            http://node{17...64}.example.com/mnt/export{1...64}

@kerneltime kerneltime force-pushed the statefulsets-init branch 3 times, most recently from d2cb981 to 227f028 Compare August 13, 2020 18:06
@harshavardhana
Copy link
Member

This somehow seems to interfere with args for MinIO Server. MinIO pods are not starting after initcontainers are done.

$ kubectl get pods
NAME             READY   STATUS             RESTARTS   AGE
minio-zone-0-0   0/1     CrashLoopBackOff   7          14m
minio-zone-0-1   0/1     CrashLoopBackOff   7          14m
minio-zone-0-2   0/1     CrashLoopBackOff   7          14m
minio-zone-0-3   0/1     CrashLoopBackOff   7          14m
$ kubectl logs minio-zone-0-0
NAME:
  minio server - start object storage server

USAGE:
  minio server [FLAGS] DIR1 [DIR2..]
  minio server [FLAGS] DIR{1...64}
  minio server [FLAGS] DIR{1...64} DIR{65...128}

DIR:
  DIR points to a directory on a filesystem. When you want to combine
  multiple drives into a single large system, pass one directory per
  filesystem separated by space. You may also use a '...' convention
  to abbreviate the directory arguments. Remote directories in a
  distributed setup are encoded as HTTP(s) URIs.

FLAGS:
  --address value              bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default: ":9000")
  --certs-dir value, -S value  path to certs directory (default: "/root/.minio/certs")
  --quiet                      disable startup information
  --anonymous                  hide sensitive information from logging
  --json                       output server logs and startup information in json format
  --help, -h                   show help
  
EXAMPLES:
  1. Start minio server on "/home/shared" directory.
     $ minio server /home/shared

  2. Start single node server with 64 local drives "/mnt/data1" to "/mnt/data64".
     $ minio server /mnt/data{1...64}

  3. Start distributed minio server on an 32 node setup with 32 drives each, run following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...32}.example.com/mnt/export{1...32}

  4. Start distributed minio server in an expanded setup, run the following command on all the nodes
     $ export MINIO_ACCESS_KEY=minio
     $ export MINIO_SECRET_KEY=miniostorage
     $ minio server http://node{1...16}.example.com/mnt/export{1...32} \
            http://node{17...64}.example.com/mnt/export{1...64}

I think this must be because of MinIO version you used in your tenant.yaml

@nitisht
Copy link
Contributor

nitisht commented Aug 14, 2020

I think this must be because of MinIO version you used in your tenant.yaml

Yes, great catch. Let me try with edge

@harshavardhana
Copy link
Member

I think this must be because of MinIO version you used in your tenant.yaml

Yes, great catch. Let me try with edge

No just latest release is fine the tenant.yaml was not updated which is now..

nitisht
nitisht previously approved these changes Aug 14, 2020
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM & Tested. Works fine. Sorry for the confusion

Signed-off-by: Ritesh H Shukla <ritesh@minio.io>
@harshavardhana harshavardhana changed the title Create init add init container for sanity checks Aug 18, 2020
@harshavardhana
Copy link
Member

PTAL @nitisht again

@nitisht nitisht merged commit 3c1908d into minio:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants