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

Syntax error in /etc/nbdtab when using ip as host #131

Closed
Stav88 opened this issue Jan 7, 2022 · 0 comments
Closed

Syntax error in /etc/nbdtab when using ip as host #131

Stav88 opened this issue Jan 7, 2022 · 0 comments

Comments

@Stav88
Copy link

Stav88 commented Jan 7, 2022

I think it follow ##119 (it work in a previous build)

Environnment

Distribution : Manjaro aarch64 (pinebook pro)
Package : nbd 3.23-1

Scenario

  • Create a file /etc/nbdtab with following :
    nbd0 192.168.0.14 cdrom persist
    
  • Try to mount nbd0 :
    nbd-client nbd0
  • Returned error :
    parse error parsing /etc/nbdtab: syntax errorERROR: no valid configuration for specified device found
    

My analyze

  • In nbdtab_parser.y, I see that second column is a STRING token
  • In nbdtab_lexer.l, I see then the STRING token must not contain dot .
  • Ip address containes dots ., so it is not a valid STRING token

Workaround

  • define a hostname without dot in /etc/hosts
    ...
    nbd-server 192.168.0.14
    
  • use this hostname in /etc/nbdtab
    nbd0 nbd-server cdrom persist
    
@yoe yoe closed this as completed in 5750003 Jan 13, 2022
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

1 participant