Re: How to bump ulimit?

2017-03-16 Thread Michi Henning

> 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

Michi.


> 
> -- 
> 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 <jacek.ny...@canonical.com> 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
>> 
>> 
> 
> 
> -- 
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/snapcraft


-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to bump ulimit?

2017-03-16 Thread Michi Henning
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


-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: content interface, DENIED mounting $SNAP/mydir

2017-03-02 Thread Michi Henning

> On 3 Mar 2017, at 4:33 , knitzsche  wrote:
> 
> Hi,
> 
> I am trying to use the wifi-ap content sharing interface.
> 
> It is DENIED (see below) when I try to use a $SNAP directory.
> 
> It works when I instead use $SNAP_DATA directory for the content sharing. 
> But, I have to create that directory at run time: I can't figure out so far 
> how to create (from snapcraft.yaml) an empty dir in $SNAP_COMMON or 
> $SNAP_DATA at install time. (Knowing this would solve my problem.)


We do this to create a directory:

install: |
  # Make sure we have a mount point for ubuntu-app-platform
  mkdir -p $SNAPCRAFT_PART_INSTALL/ubuntu-app-platform

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: HOWTO: How to snap timg (text image viewer)

2017-03-01 Thread Michi Henning
> 
> That's not true.  When a command or daemon in a strict mode snap gets
> executed, it runs in a different mount namespace where the file system
> root is the contents of the "core" snap.  You can verify this by
> executing the following:
> 
>snap run --shell command_name
> 
> .. and use that shell to inspect the file system as seen by that
> particular command.

Ah, OK, I stand corrected. I was probably running in devmode when I picked up 
system libs.

Michi.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Package too old for cleanbuild

2017-02-12 Thread Michi Henning
> 
> While I don't disagree with the suggestions here, if I may suggest a
> workaround:
> 
> If you find yourself using cleanbuild a lot (it makes a new ephemeral
> container, builds, then destroys the container), you might find some
> workflow improvements by simply developing the snap in a container. You
> can even bind-mount the source from the host, if you want. This is the
> workflow I use personally. It allows for one to fully customize the apt
> sources while also utilizing Snapcraft's built-in stage package cache*,
> and it doesn't clutter the development environment on the host.

Thanks Kyle!

While this works, I don’t think it meets the pragmatic needs of the developer. 
It’s already complex enough to learn a new tool chain and figure out an 
effective edit/debug/test cycle. If I have to set up my own container for this, 
I end up adding yet more variables and possible sources of errors.

We really need the tool to take care of this, otherwise everyone goes through 
the same pain (and mistakes) over and over. The big bottleneck here is the 
endless re-downloading of all the packages. If snapcraft could take care of 
this transparently and use a cache, things would proceed at a tolerable pace, 
without everyone having to re-invent their own wheel.

Cheers,

Michi.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Package too old for cleanbuild

2017-02-12 Thread Michi Henning
I’ve opened a bug here for the overlay build:

https://launchpad.net/bugs/1664100 

Michi.


> On 10 Feb 2017, at 9:12 , Leo Arias  wrote:
> 
> Hello,
> 
> We have a few cleanbuild bugs open:
> https://bugs.launchpad.net/snapcraft/+bugs?field.tag=cleanbuild
> 
> Some of them are related to what you are asking, so I would appreciate
> if you go in there and add your comments with the ideal solution for
> your use case. If you don't find any bug that asks for what you need,
> please report a new one.
> 
> Also note that some bugs are not confirmed. It's really useful for us
> when we are planning the work for the next sprint to look at the bugs
> that affect more than one person. So if you would like to see one bug
> fixed soon, mark it as affecting you, we'll hear it.
> 
> Our planning meeting is tomorrow :)
> 
> pura vida.
> 
> -- 
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/snapcraft

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Package too old for cleanbuild

2017-02-05 Thread Michi Henning
> Would it make sense to extend the snapcraft yaml to let the developer
> specify where build-packages and stage-packages should be taken from?
> 
> It would be nice to be able to run a "snapcraft cleanbuild" from zesty
> while effectively using all the packages from xenial+overlay... :-)

That certainly would be nice, yes. It would also be awesome to be able to point 
apt inside the container at my  apt-cacher-ng cache. As is, every failed 
attempt to do a cleanbuild downloads ~150 MB and, on a 3 Mbit link, takes 10-15 
minutes. For development and debugging, we really need something like this. As 
is, it’s unbelievably painful.

Michi.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Package too old for cleanbuild

2017-02-05 Thread Michi Henning
I’m trying to get thumbnailer to build with snapcraft cleanbuild.

We depend on cmake-extras for the build. I’ve added that to the build-packages 
list. The version of cmake that gets installed is 0.6, but we need the latest 
1.0.

Is it possible to add the overlay PPA to cleanbuild somehow? If not, we’d have 
to SRU cmake-extras I guess?

Not sure about the correct process here…

Thanks,

Michi.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Max retries exceeded?

2017-02-05 Thread Michi Henning
> Can you try:
> $ lxc exec snapcraft-merely-model-ewe -- curl 
> https://parts.snapcraft.io/v1/parts.yaml 
> 
> 
> ? I can only confirm that curling that from various machines here responds 
> fine (and that there haven't been any alerts for that service for the past 
> day).

I rebooted meantime, and the problem magically disappeared :-(

Michi.-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Max retries exceeded?

2017-02-05 Thread Michi Henning
I keep getting this error when doing a snapcraft cleanbuild. Any suggestions? I 
checked name resolution, and my DNS resolves parts.snapcraft.io 
 just fine.

Thanks,

Michi.

Setting up python3-lxml (3.5.0-1build1) ...
Setting up python3-petname (2.0-0ubuntu1~16.04) ...
Setting up python3-progressbar (2.3-2) ...
Setting up python3-pymacaroons (0.9.2-0ubuntu1) ...
Setting up python3-requests-toolbelt (0.6.0-2) ...
Setting up python3-simplejson (3.8.1-1ubuntu2) ...
Setting up python3-tabulate (0.7.5-1) ...
Setting up python3-xdg (0.25-4) ...
Setting up xdelta3 (3.0.8-dfsg-1ubuntu2) ...
Setting up python3-libarchive-c (2.1-3) ...
Setting up python3-magic (1:5.25-2ubuntu1) ...
Setting up snapcraft (2.26) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
HTTPSConnectionPool(host='parts.snapcraft.io', port=443): Max retries exceeded 
with url: /v1/parts.yaml (Caused by 
NewConnectionError(': Failed to establish a new connection: [Errno -3] 
Temporary failure in name resolution',))
Stopping snapcraft-merely-model-ewe
Command '['lxc', 'exec', 'snapcraft-merely-model-ewe', '--', 'snapcraft', 
'snap', '--output', 'thumbnailer_2.4_amd64.snap']' returned non-zero exit 
status 1



-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Daemon: dbus examples

2016-12-12 Thread Michi Henning
I tried this too, and the “dbus” key value was rejected. Looks like this might 
be a moldie oldie?

Michi.


> On 12 Dec. 2016, at 17:41 , Didier Roche  wrote:
> 
> Le 10/12/2016 à 14:29, l-snapcr...@znn.info a écrit :
>> Hi Snapcrafter,
> 
> Hey lightonflux
>> 
>> in the documentation about keys in the yaml i saw a mention of "daemon:
>> dbus" (1), but i could not find an explanation in the documentation of a
>> real world example how it is used on github.
>> 
>> Can someone point me to an example snapcraft.yaml where i can see how it
>> is used?
>> Or other documentation that gets more into detail.
> 
> We do suport similar keywords than systemd units. in that case, service
> files which are created by snapd. (man systemd.service for more
> information). The dbus type specifies there:
>  Behavior of dbus is similar to simple; however, it is expected that
>  the daemon acquires a name on the D-Bus bus, as configured by
>  BusName=. systemd will proceed with starting follow-up units after
>  the D-Bus bus name has been acquired. Service units with this
>  option configured implicitly gain dependencies on the dbus.socket
>  unit. This type is the default if BusName= is specified.
> 
> And this is where i'm surprised, we don't support AFAIK additional names
> like BusName or such in snap.yaml, and so, the dbus keyword without
> BusName doesn't make any sense. Michael, can you shed some lights here?
> Cheers,
> Didier
> 
> 
> -- 
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/snapcraft


-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft