Re: How to bump ulimit?
On 17/03/17 02:40, Michi Henning wrote: > >> Would you mind pasting exact command that worked for you from inside a snap? >> >> In my case ulimit works just fine outside of confinement. For example: >> jacek@laptop:~$ ulimit -n 10240 >> jacek@laptop:~$ ulimit -n >> 10240 >> >> But when I try the same when confined I can only go as high as 4096. > > $ cat /proc/sys/fs/file-max > 1624349 > $ ulimit -Hn > 65536 > $ ulimit -Sn > 1024 > $ ulimit -Sn 65536 > $ ulimit -Sn > 65536 > > This works for me when running a confined shell: > > $ snap run —shell mysnap.mycommand Interesting. This worked for me too with snap run --shell. I wonder if hard limit for my daemon is different than the one I get when I snap run --shell? Anyway I'll dig a big deeper and file a bug if needed, thanks for help. -- Jacek signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: How to bump ulimit?
Hi, Would you mind pasting exact command that worked for you from inside a snap? In my case ulimit works just fine outside of confinement. For example: jacek@laptop:~$ ulimit -n 10240 jacek@laptop:~$ ulimit -n 10240 But when I try the same when confined I can only go as high as 4096. -- Jacek On 16/03/17 13:06, Michi Henning wrote: > Typing "ubuntu more than 4096 file descriptors” into Google worked well for > me. > > Michi. > > >> On 15 Mar 2017, at 21:56 , Jacek Nykis wrote: >> >> Hello, >> >> I have a server application that hit max open files limit, which by >> default is set to 1024. >> >> I'd like to bump that limit significantly but it appears that I can only >> go as high as 4096. When I try with value 4097 I'm getting this: >> >> 7: ulimit: error setting limit (Operation not permitted) >> >> Is there a way to increase ulimit values beyond 4096? >> >> -- >> Regards, >> Jacek >> >> -- >> Snapcraft mailing list >> Snapcraft@lists.snapcraft.io >> Modify settings or unsubscribe at: >> https://lists.ubuntu.com/mailman/listinfo/snapcraft > > signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
How to bump ulimit?
Hello, I have a server application that hit max open files limit, which by default is set to 1024. I'd like to bump that limit significantly but it appears that I can only go as high as 4096. When I try with value 4097 I'm getting this: 7: ulimit: error setting limit (Operation not permitted) Is there a way to increase ulimit values beyond 4096? -- Regards, Jacek signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: content sharing from $SNAP_COMMON
On 21/12/16 17:43, Jacek Nykis wrote: > On 21/12/16 17:22, Pat McGowan wrote: >> The documentation on sharing writable data was updated last week, notably >> saying this works in version 2.19.1 and later. There is also a >> recommendation to not use subfolders. 2.20.1 is available from xenial >> proposed. >> >> https://github.com/snapcore/snapd/wiki/Content-Interface >> >> Hope it helps >> Pat > > Thanks for suggestion Pat. > > I saw that page but I am trying to share read only data. It does not > work in 2.17, I also tried with 2.20.1 without luck. > > I am trying to share single directory containing one file. > > Regards, > Jacek Thank you everybody for help, especially zyga on rocketchat! He was able to clarify things for me and provider workaround. I added info to the bug in case others hit this problem: https://bugs.launchpad.net/snappy/+bug/1650671/comments/2 Regards, Jacek signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: content sharing from $SNAP_COMMON
On 21/12/16 17:22, Pat McGowan wrote: > The documentation on sharing writable data was updated last week, notably > saying this works in version 2.19.1 and later. There is also a > recommendation to not use subfolders. 2.20.1 is available from xenial > proposed. > > https://github.com/snapcore/snapd/wiki/Content-Interface > > Hope it helps > Pat Thanks for suggestion Pat. I saw that page but I am trying to share read only data. It does not work in 2.17, I also tried with 2.20.1 without luck. I am trying to share single directory containing one file. Regards, Jacek > > On Wed, Dec 21, 2016 at 11:48 AM, Jacek Nykis > wrote: > >> Hi, >> >> I'm also affected by this problem, I can see that there is a bug in >> Launchpad now: >> >> https://bugs.launchpad.net/snappy/+bug/1650671 >> >> Does anybody know how to troubleshoot this? There is nothing interesting >> in /var/log/syslog >> >> Jacek >> >> On 09/12/16 22:53, Tim Kuhlman wrote: >>> I had an opportunity to experiment some more unfortunately it still >> isn't working but I can provide more details. >>> >>> I was pointed to some documentation at https://github.com/snapcore/ >> snapd/wiki/Content-Interface and used that >>> to update a bit of naming in the config. I have been running on yakety >> with the version of snapd and other >>> tools from yakety but in my debugging I updated to the latest snapd from >> the snappy edge ppa because I >>> discovered that without that $SNAP* prefixes in the config don't work >> otherwise. >>> >>> I'm working with the promreg charm which is the producer, it has this >> config: >>> slots: >>> content: >>> content: promreg >>> read: [$SNAP_COMMON/promreg] >>> >>> The consumer is the prometheus charm which has this config. >>> plugs: >>> content: >>> content: promreg >>> target: etc/prometheus/promreg >>> >>> After creating the charms and installing them then linking with the >> command `snap connect prometheus:content >>> promreg:content` I ran `sudo snap run --shell prometheus` initially I >> would get path errors, which I solved >>> with the upgraded snapd. >>> >>> The directory '/var/snap/promreg/common/promreg' does exist and has >> data in it. The destination directory in >>> the prometheus snap didn't originally exist but I tried creating it >> after reading >>> http://askubuntu.com/questions/841004/cannot-get- >> basic-content-interface-example-working-with-snapcraft >>> >>> After getting a shell with the command `sudo snap run --shell >> prometheus` I see that the destination dir is >>> empty if the destination dir was pre-existing and it doesn't exist at >> all if dir wasn't pre-existing. >>> >>> Any details I am missing? other debug steps? >>> >>> Tim >>> >>> On 12/05/2016 12:25 AM, Didier Roche wrote: >>>> Le 02/12/2016 à 19:34, Tim Kuhlman a écrit : >>>>> I have a snap that writes data to $SNAP_COMMON as it runs and I want >> to make that data available to another >>>>> snap. Unfortunately when I setup the content interface and set the >> plug side to share >>>>> '/var/snap/snap-name/common/subdir' it fails. >>>>> >>>>> I can share data in $SNAP with the content interface but of course the >> daemon running in that snap can't >>>>> write there. Am I missing anything? Is there any way to share >> dynamically created data from one snap with another? >>>>> >>>>> Thanks for the help. >>>> >>>> Hey Tim, >>>> >>>> I know that was supposed to be supported, but I don't know the >>>> implementation status of this. >>>> >>>> Zygmunt, can you shed some lights to us there? >>>> Cheers, >>>> Didier >>>> >>>> >>> >> >> >> >> -- >> Snapcraft mailing list >> Snapcraft@lists.snapcraft.io >> Modify settings or unsubscribe at: https://lists.ubuntu.com/ >> mailman/listinfo/snapcraft >> >> > > > signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: content sharing from $SNAP_COMMON
Hi, I'm also affected by this problem, I can see that there is a bug in Launchpad now: https://bugs.launchpad.net/snappy/+bug/1650671 Does anybody know how to troubleshoot this? There is nothing interesting in /var/log/syslog Jacek On 09/12/16 22:53, Tim Kuhlman wrote: > I had an opportunity to experiment some more unfortunately it still isn't > working but I can provide more details. > > I was pointed to some documentation at > https://github.com/snapcore/snapd/wiki/Content-Interface and used that > to update a bit of naming in the config. I have been running on yakety with > the version of snapd and other > tools from yakety but in my debugging I updated to the latest snapd from the > snappy edge ppa because I > discovered that without that $SNAP* prefixes in the config don't work > otherwise. > > I'm working with the promreg charm which is the producer, it has this config: > slots: > content: > content: promreg > read: [$SNAP_COMMON/promreg] > > The consumer is the prometheus charm which has this config. > plugs: > content: > content: promreg > target: etc/prometheus/promreg > > After creating the charms and installing them then linking with the command > `snap connect prometheus:content > promreg:content` I ran `sudo snap run --shell prometheus` initially I would > get path errors, which I solved > with the upgraded snapd. > > The directory '/var/snap/promreg/common/promreg' does exist and has data in > it. The destination directory in > the prometheus snap didn't originally exist but I tried creating it after > reading > http://askubuntu.com/questions/841004/cannot-get-basic-content-interface-example-working-with-snapcraft > > After getting a shell with the command `sudo snap run --shell prometheus` I > see that the destination dir is > empty if the destination dir was pre-existing and it doesn't exist at all if > dir wasn't pre-existing. > > Any details I am missing? other debug steps? > > Tim > > On 12/05/2016 12:25 AM, Didier Roche wrote: >> Le 02/12/2016 à 19:34, Tim Kuhlman a écrit : >>> I have a snap that writes data to $SNAP_COMMON as it runs and I want to >>> make that data available to another >>> snap. Unfortunately when I setup the content interface and set the plug >>> side to share >>> '/var/snap/snap-name/common/subdir' it fails. >>> >>> I can share data in $SNAP with the content interface but of course the >>> daemon running in that snap can't >>> write there. Am I missing anything? Is there any way to share dynamically >>> created data from one snap with another? >>> >>> Thanks for the help. >> >> Hey Tim, >> >> I know that was supposed to be supported, but I don't know the >> implementation status of this. >> >> Zygmunt, can you shed some lights to us there? >> Cheers, >> Didier >> >> > signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: Recommended ways of installing configuration files in SNAP_USER_DATA?
On 13/12/16 09:42, Stuart Bishop wrote: >> I might be one step close to getting this to work but I was wondering what >> is the common/recommended practice to do what I’m trying to achieve here? > > > I used the same approach you did, and got it building locally and working ( > https://code.launchpad.net/~stub/+git/pgbouncer-snap/+ref/master , please > steal freely if there is anything useful there ). I haven't published it > anywhere because I thought there was a reasonable chance you would be > looking at it :) Also, I'm holding out hope that we can run non-root > daemons sooner rather than later since pgbouncer is another app that > refuses to run as root. I wasn't looking forward to documenting how to > manually install systemd service definitions :) I also had similar problem and had to write small wrapper. If you want one more example to look at you can find source code here: https://git.launchpad.net/prometheus-pushgateway-snap/tree/ There is an enhancement request in launchpad where we asked for a standard way to deploy initial config files without need for every snap to ship with custom wrappers: https://bugs.launchpad.net/snappy/+bug/1611287 If that would help you you can mark the bug as affecting you to let developers know. Regards, Jacek Nykis signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: High score
On 12/10/16 07:29, Spencer wrote: > I was thinking of adding a "high score" feature to my snap app that, when a > player wins, goves them the option of reporting over http their score which > would be stored in a database and displayed by a website. Is this possible > with snaps, or would the security prevent it? It already prevents my app > from launching the browser with a given URL. > Hi Spencer, Yes it is possible. To allow your snap to make outbound network calls you need to use add "network" plug to your app in the "apps" section: plugs: [network] You can find more info here: https://developer.ubuntu.com/en/snappy/guides/interfaces/ Regards, Jacek signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: How to tell dump plugin to only copy a specific file
On 03/10/16 23:59, Omer Akram wrote: > On Tue, Oct 4, 2016 at 3:53 AM, Sergio Schvezov < > sergio.schve...@canonical.com> wrote: > >> >> >> El 03/10/16 a las 19:45, Omer Akram escribió: >> >>> Hi! >>> >>> I have a very simple python application with a library part and a >>> launcher. The library is being compile by the `python` plugin and I am >>> copying the launcher with `dump` plugin. It works but it seems that the >>> dump plugin copies all the undesired files in the root of my project into >>> the final snap, I only want it to copy a single file. Is there a config >>> that I can tell the plugin to only copy that specific file ? >>> >> >> Use filesets, stage or prime, or both. > > > Is there an example on how a filesets line may look like, a grep on the > playpen repository does not seem to match filesets ? https://git.launchpad.net/prometheus-snap/tree/snapcraft.yaml Regards, Jacek signature.asc Description: OpenPGP digital signature -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft