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

odo storage create should create without a path #4101

Closed
maysunfaisal opened this issue Oct 8, 2020 · 4 comments
Closed

odo storage create should create without a path #4101

maysunfaisal opened this issue Oct 8, 2020 · 4 comments
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.

Comments

@maysunfaisal
Copy link
Contributor

maysunfaisal commented Oct 8, 2020

/kind bug

What versions of software are you using?

Operating System:

Output of odo version:

How did you run odo exactly?

Maysuns-MacBook-Pro:springboot-ex maysun$ odo storage list
The component 'myjava' has the following storage attached:
NAME          SIZE     PATH               STATE
m2            3Gi      /home/user/.m2     Pushed
maysun        1Gi      /maysun            Pushed
maysunsto     4Gi      /test              Not Pushed

Maysuns-MacBook-Pro:springboot-ex maysun$ odo storage create teststorage --size 4Gi
Error: required flag(s) "path" not set
Usage:
  odo storage create [flags]

Examples:
  # Create storage of size 1Gb to a component
  odo storage create mystorage --path=/opt/app-root/src/storage/ --size=1Gi

Flags:
      --context string   Use given context directory as a source for component settings
  -h, --help             Help for create
      --path string      Path to mount the storage on
      --size string      Size of storage to add

Additional Flags:
  -o, --o string             Specify output format, supported format: json
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging

 ✗  required flag(s) "path" not set

Actual behavior

error'd out

Expected behavior

odo storage create should succeed given that the volume mount path is optional and defaults to volume mount name. Discovered when working with PR #4045

Any logs, error output, etc?

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 8, 2020
@maysunfaisal maysunfaisal added area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. area/storage labels Oct 8, 2020
@maysunfaisal maysunfaisal self-assigned this Oct 8, 2020
@maysunfaisal
Copy link
Contributor Author

@mik-dass do you agree with this issue? If yes, I can include it in the PR. Lmk what you think..

@mik-dass
Copy link
Contributor

mik-dass commented Oct 9, 2020

@mik-dass do you agree with this issue? If yes, I can include it in the PR. Lmk what you think..

Did you mean path name? If yes, I agree we should use a default one if one is not provided. @kadel WDYT?

@maysunfaisal
Copy link
Contributor Author

@mik-dass yes I meant path, editing the title and OP

@maysunfaisal maysunfaisal changed the title odo storage create should create without a name odo storage create should create without a path Oct 9, 2020
@girishramnani
Copy link
Contributor

seems like this issue was resolved by #4045
confirming locally

odo storage create teststorage --size 4Gi
 ✓  Added storage teststorage to nodejs

Please use `odo push` command to make the storage accessible to the component
(base) girish@MacBook-Pro blah % odo storage list
The component 'nodejs' has the following storage attached:
NAME            SIZE     PATH             STATE
teststorage     4Gi      /teststorage     Not Pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants