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

libparam arguments that have equals sign (=) ar not properly handed by kraft run #1407

Closed
razvand opened this issue Mar 13, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@razvand
Copy link
Contributor

razvand commented Mar 13, 2024

Describe the bug

When aiming to pass library arguments that contain the equals sign (=) an error is thrown by KraftKit at kraft run stage:

$ kraft run --log-level debug --log-type basic --rm -p 6379:6379 -a "env.vars=[ x=b ]" unikraft.org/redis:7.2 -M 512M
[...]
 E  expected param to be in the format 'libname.param=value' but got: 'env.vars=[ x=b ]'
[...]

Replacing the equals sign with something else works:

$ kraft run --log-level debug --log-type basic --rm -p 6379:6379 -a "env.vars=[ x:b ]" unikraft.org/redis:7.2 -M 512M
[...]
qemu-system-x86_64 -append env.vars=[ x:b ] -- /usr/bin/redis-server /etc/redis/redis.conf ...
[...]

Note that directly invoking qemu-system-x86_64 works, so the issue is with Kraft:

qemu-system-x86_64 -append "env.vars=[ x:b ] -- /usr/bin/redis-server /etc/redis/redis.conf" -kernel 7.2/.unikraft/build/redis_qemu-x86_64 -nographic -cpu max -m 512

qemu-system-x86_64 -append "env.vars=[ x=b ] -- /usr/bin/redis-server /etc/redis/redis.conf" -kernel 7.2/.unikraft/build/redis_qemu-x86_64 -nographic -cpu max -m 512

Steps to reproduce

Use the kraft run command above:

kraft run --log-level debug --log-type basic --rm -p 6379:6379 -a "env.vars=[ x=b ]" unikraft.org/redis:7.2 -M 512M

Expected behavior

The kernel should start with the proper argument passed.

Which architectures were you using or does this bug affect?

x86_64

Which operating system were you using or does this bug affect?

No response

Relevant log output

D  using platform=qemu                                                                                                
 D  determining how to proceed given provided input and context
 D  using compatible context candidate=oci                                                                             
 D  querying catalog arch=x86_64 local=true name=unikraft.org/redis:7.2 plat=qemu remote=false types=[app]
 i  found unikraft.org/redis:7.2 (qemu/x86_64) (5b227be, c5ebda4, qemu/x86_64, 25 MB)                                  
 D  found 1/1 matching packages in oci catalog             
 i  using arch=x86_64 plat=qemu                                                                                        
 D  qemu-system-x86_64 -version                                                                                        
 D  qemu-system-x86_64 -accel help                         
 E  expected param to be in the format 'libname.param=value' but got: 'env.vars=[ x=b ]'
@razvand razvand added the kind/bug Something isn't working label Mar 13, 2024
@craciunoiuc
Copy link
Member

Fixed by 692b470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants