Skip to content

Problem passing command line arguments #23

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

Open
mark-parker opened this issue Oct 28, 2017 · 1 comment
Open

Problem passing command line arguments #23

mark-parker opened this issue Oct 28, 2017 · 1 comment

Comments

@mark-parker
Copy link
Contributor

mark-parker commented Oct 28, 2017

I have a file path that I can't seem to pass in as a command line argument.

In order to pass the file path from the command line I add "${Meta.FILE_ID}" to the arguments section in config.yml

Here's a snippet of my config.yml
meta:

  • FILE_ID

# Command to be run as child process
command: /app/checksumd
# Arguments passed to the command
args: [
"-file", "${Meta.FILE_ID}", "-all"
]

Here's my output:
C:\Projects\Go\src\github.com\d3sw\checksum>docker run --net="host" --rm -v D:\storage\staging\Vault:/data checksum FILE_ID=/data/movie.ts
2017/10/28 00:07:45 [INFO] Registered handler: phase=progress handler=gnatsd
2017/10/28 00:07:45 [INFO] Registered handler: phase=completed handler=gnatsd
2017/10/28 00:07:45 [INFO] Registered handler: phase=failed handler=gnatsd
2017/10/28 00:07:45 [INFO] (child) spawning: /app/checksumd -file ${Meta.FILE_ID} -all
2017/10/28 00:07:45 [ERROR] phase=progress handler=gnatsd transform: no matching data
[gnatsd] phase=failed topic=deluxe.checksum.status &{Code:2 Stdout:[67 97 110 110 111 116 32 111 112 101 110 32 102 105 108 101 58 32 36 123 77 101 116 97 46 70 73 76 69 95 73 68 125] Stderr:[112 97 110 105 99 58 32 105 110 118 97 108 105 100 32 97 114 103 117 109 101 110 116 10 10 103 111 114 111 117 116 105 110 101 32 49 32 91 114 117 110 110 105 110 103 93 58 10 103 105 116 104 117 98 46 99 111 109 47 100 51 115 119 47 99 104 101 99 107 115 117 109 47 99 104 101 99 107 115 117 109 46 40 42 67 104 101 99 107 115 117 109 41 46 67 97 108 99 117 108 97 116 101 72 97 115 104 101 115 40 48 120 99 52 50 48 48 50 102 102 49 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 48 120 48 44 32 46 46 46 41 10 9 67 58 47 80 114 111 106 101 99 116 115 47 71 111 47 115 114 99 47 103 105 116 104 117 98 46 99 111 109 47 100 51 115 119 47 99 104 101 99 107 115 117 109 47 99 104 101 99 107 115 117 109 47 99 104 101 99 107 115 117 109 46 103 111 58 57 55 32 43 48 120 53 98 53 10 109 97 105 110 46 109 97 105 110 40 41 10 9 67 58 47 80 114 111 106 101 99 116 115 47 71 111 47 115 114 99 47 103 105 116 104 117 98 46 99 111 109 47 100 51 115 119 47 99 104 101 99 107 115 117 109 47 109 97 105 110 46 103 111 58 52 52 32 43 48 120 49 54 48]}

If I hard code the file path as in the argument section it works:

meta:

  • FILE_ID

# Command to be run as child process
command: /app/checksumd
# Arguments passed to the command
args: [
"-file", "/data/movie.mpg", "-all"
]

C:\Projects\Go\src\github.com\d3sw\checksum>docker run --net="host" --rm -v D:\storage\staging\Vault:/data checksum FILE_ID=/data/movie.ts
2017/10/28 00:15:11 [INFO] Registered handler: phase=progress handler=gnatsd
2017/10/28 00:15:11 [INFO] Registered handler: phase=completed handler=gnatsd
2017/10/28 00:15:11 [INFO] Registered handler: phase=failed handler=gnatsd
2017/10/28 00:15:11 [INFO] (child) spawning: /app/checksumd -file /data/movie.ts -all
[gnatsd] phase=progress topic=deluxe.checksum.progress map[Pfff:110100000020000100FFFF0F0001:F791C37D3970A63B4948897C4416D0CA Md5:12babc6149da3b5ba7afafe6120e8c44 Sha1:a667c61ef6564fad77418b14bcd8e7ea01368978 Sha256:41a5da6bee974bf6793d61689b2c051513efec4343cb441e75298188f9458605 Sha512:6d52fb8da9c4bbd30688c7cc7d1f33d771e9362a36846e14e6c692c0626c4fd67c7667fcaeaab7bc8d80494a8def1720df3d290611c3cf9f872ae25129e68694]
[gnatsd] phase=completed topic=deluxe.checksum.status map[Sha512:6d52fb8da9c4bbd30688c7cc7d1f33d771e9362a36846e14e6c692c0626c4fd67c7667fcaeaab7bc8d80494a8def1720df3d290611c3cf9f872ae25129e68694 Pfff:110100000020000100FFFF0F0001:F791C37D3970A63B4948897C4416D0CA Md5:12babc6149da3b5ba7afafe6120e8c44 Sha1:a667c61ef6564fad77418b14bcd8e7ea01368978 Sha256:41a5da6bee974bf6793d61689b2c051513efec4343cb441e75298188f9458605]

@euforia
Copy link
Contributor

euforia commented Nov 2, 2017

Seems like the transform may be malformed. If you look at this line

2017/10/28 00:07:45 [ERROR] phase=progress handler=gnatsd transform: no matching data

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

No branches or pull requests

2 participants