Can not do DNS in snap

My app cannot process DNS requests. The snappy-debug shows nothing. How to set it?
The yaml file is as follows:

> grade: stable
> confinement: strict
> plugs:
>   etc-lvm-backup:
>     interface: system-files
>     write:
>       [/etc/lvm/backup,/etc,/etc/visual_lvm,/dev/mapper/control,/proc/sys/vm/drop_caches,/run/lock/lvm,/dev]
>     read:
>       [/etc/lvm/backup,/etc,/etc/visual_lvm,/dev]
> 
>   null-device:
>     interface: system-files
>     write:
>       [/dev/nul]
> 
>   enum-devices:
>     interface: system-files
>     read:
>       [/sys/devices,/dev,/proc,/proc/partitions]
> 
> parts:
>   visual-lvm-remote:
>     plugin: dump
> 
>   integration:
>     plugin: nil
>     stage-packages: [lvm2]
> 
> 
> passthrough:
>   layout:
>     /etc:
>       bind: $SNAP_DATA/etc
> 
> apps:
>   start:
>     plugs:
>       [block-devices,enum-devices,network-bind,etc-lvm-backup,network,system-observe]
>     command: bin/vlvmservice start $SNAP_DATA
>   stop:
>     plugs:
>       [system-observe,null-device]
>     command: bin/vlvmservice stop $SNAP_DATA

this is unreadable, please add three back-ticks ``` above and below any pasted yaml so the indentation stays intact in the forum display

Done.
The character pad…

1 Like

I’ll be willing to bet this is because you’re masking the entirety of /etc in your layout.

Worth also mentioning that layout doesn’t require passthrough any more.

3 Likes

Yes, it is the reason.
I’ve found the solution, thank you!