Re: [PATCH v2] cloud-init: use hostname from yaml file

2016-11-17 Thread Justin Cinkelj
The only v2 difference is - do not call sethostname if new name is empty. - Original Message - > From: "Justin Cinkelj" > To: osv-dev@googlegroups.com > Cc: "Justin Cinkelj" > Sent: Thursday, November 17, 2016 4:06:53 PM > Subject: [PATCH v2] cloud-init: use hostname from yaml file > >

[PATCH v2] cloud-init: use hostname from yaml file

2016-11-17 Thread Justin Cinkelj
Previously cloud-init set VM hostname if EC2/GCE was used as source. But it ignored hostname if it was specified via yaml file or contextualization image. The commit fixes this, so that hostname can be set via yaml file too. The example cloud-init.yaml file is updated with commented-out examples

[PATCH] cloud-init: use hostname from yaml file

2016-11-17 Thread Justin Cinkelj
Previously cloud-init set VM hostname if EC2/GCE was used as source. But it ignored hostname if it was specified via yaml file or contextualization image. The commit fixes this, so that hostname can be set via yaml file too. The example cloud-init.yaml file is updated with commented-out examples

Re: [PATCH] dhcp: propose our hostname to DHCP server

2016-11-17 Thread Justin Cinkelj
Thank you, for accepting and improving. Justin - Original Message - > From: "Nadav Har'El" > To: "Justin Cinkelj" > Cc: "Osv Dev" > Sent: Thursday, November 17, 2016 1:03:56 PM > Subject: Re: [PATCH] dhcp: propose our hostname to DHCP server > > Thanks. I pushed this patch, but added a

Re: Can we run mobile applications(exactly Android app) in OSv unikernels?

2016-11-17 Thread maryandmeichao
在 2016年11月17日星期四 UTC+8下午7:13:38,Joe Duarte写道: > On Wednesday, November 16, 2016 at 5:02:32 AM UTC-7, Pekka Enberg wrote:On > Wed, Nov 16, 2016 at 9:18 AM,   wrote: > > >       Unikernel has a lot of advantages(fast,small,secure),it is a good > > choice to be used on mobile applications.Recently,

Re: [PATCH] dhcp: propose our hostname to DHCP server

2016-11-17 Thread Nadav Har'El
Thanks. I pushed this patch, but added another patch: Do not call sethostname() if the DHCP server did not set the host name. Let OSv continue to use the silly default it has ("osv.local"). -- Nadav Har'El n...@scylladb.com On Wed, Nov 16, 2016 at 8:42 PM, Justin Cinkelj wrote: > Send our host

[COMMIT osv master] dhcp: ignore empty hostname

2016-11-17 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master dhcp: ignore empty hostname If the DHCP server does not send back a hostname, the existing code called sethostname() with an empty host name. Do not do that. Signed-off-by: Nadav Har'El --- diff --git a/core/dhcp.cc b/core/dhcp.cc --

[COMMIT osv master] dhcp: propose our hostname to DHCP server

2016-11-17 Thread Commit Bot
From: Justin Cinkelj Committer: Nadav Har'El Branch: master dhcp: propose our hostname to DHCP server Send our hostname to DHCP server. This gives DHCP server option to update DNS server. The usecase assumes that hostname will be set to descriptive/unique value (say via cloudinit) before DHCP

Re: Can we run mobile applications(exactly Android app) in OSv unikernels?

2016-11-17 Thread Joe Duarte
On Wednesday, November 16, 2016 at 5:02:32 AM UTC-7, Pekka Enberg wrote: > > On Wed, Nov 16, 2016 at 9:18 AM, > > wrote: > > Unikernel has a lot of advantages(fast,small,secure),it is a good > choice to be used on mobile applications.Recently,I was thinking about > running Android appli

[COMMIT osv master] rng: ignore zero bytes sent by an entropy source

2016-11-17 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master rng: ignore zero bytes sent by an entropy source If we get zero bytes from an entropy source, we should obviously do nothing with this input. But it's not clear that entropy_processor() really ignores zero bytes as expected, so let's ex

[COMMIT osv master] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Commit Bot
From: Nadav Har'El Committer: Nadav Har'El Branch: master virtio-rng: don't hang while waiting for entropy random_kthread() has a loop, where it tries to get some entropy from all sources (including the ring of internal events), feeds it into the entropy pool, and then sleeps a bit and tries a

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Nadav Har'El
On Thu, Nov 17, 2016 at 12:23 PM, Gregor Berginc wrote: > Nadav, it does solve the problem with the delay. The service starts > immediately after the instance is launched when using virtio-rng. > > Excellent. It was your observation that nailed this bug: We did have enough internal events to set

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Gregor Berginc
Nadav, it does solve the problem with the delay. The service starts immediately after the instance is launched when using virtio-rng. > On 17 Nov 2016, at 09:41, Nadav Har'El wrote: > > Gregor, can you please test if this patch really makes your /dev/urandom hang > go away? > > Tomek and/or

Re: [PATCH] rng: ignore zero bytes sent by an entropy source

2016-11-17 Thread Pekka Enberg
On Thu, Nov 17, 2016 at 12:05 PM, Nadav Har'El wrote: > If we get zero bytes from an entropy source, we should obviously do > nothing with this input. But it's not clear that entropy_processor() > really ignores zero bytes as expected, so let's explicitly ignore > such input. > > Signed-off-by: Na

[PATCH] rng: ignore zero bytes sent by an entropy source

2016-11-17 Thread Nadav Har'El
If we get zero bytes from an entropy source, we should obviously do nothing with this input. But it's not clear that entropy_processor() really ignores zero bytes as expected, so let's explicitly ignore such input. Signed-off-by: Nadav Har'El --- bsd/sys/dev/random/live_entropy_sources.cc | 5 ++

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Pekka Enberg
On Thu, Nov 17, 2016 at 11:16 AM, Nadav Har'El wrote: > > On Thu, Nov 17, 2016 at 10:57 AM, Pekka Enberg wrote: >> >> >> The virtio-rng part looks correct: >> >> Reviewed-by: Pekka Enberg >> >> However, perhaps we ought to also fix live_entropy_sources_feed() >> _not_ to feed events to entropy_p

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Nadav Har'El
On Thu, Nov 17, 2016 at 10:57 AM, Pekka Enberg wrote: > > The virtio-rng part looks correct: > > Reviewed-by: Pekka Enberg > > However, perhaps we ought to also fix live_entropy_sources_feed() > _not_ to feed events to entropy_processor() if entropy source read > returned zero like later version

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Pekka Enberg
On Thu, Nov 17, 2016 at 10:39 AM, Nadav Har'El wrote: > random_kthread() has a loop, where it tries to get some entropy from > all sources (including the ring of internal events), feeds it into the > entropy pool, and then sleeps a bit and tries again, ad infinitum. > > If the read function of *on

[PATCH v2 1/2] loader: run commands from preconfigured scripts

2016-11-17 Thread Justin Cinkelj
Usecase of this patch is for example HDFS. There we have one java program, which can be run as (one) namenode or as (multiple) datanodes. We whish to provide convinient shortcut for selection of the two distinc java commandline parameters. So we put all required parameters into two script-like file

[PATCH v2 0/2] run commands from preconfigured scripts

2016-11-17 Thread Justin Cinkelj
Compared to v1 patch I only added additional patch to allow emtpy command line. At least one application still needs to be specified, but now it can be either via command line or via runscript option. Justin Cinkelj (2): loader: run commands from preconfigured scripts loader: shutdown only if

[PATCH v2 2/2] loader: shutdown only if there is neither command nor runscript set

2016-11-17 Thread Justin Cinkelj
Loader requires at least one program to be run via command line. With runscript option, command line could be empty, and application to be run would be specified via runscript only. The check for missing application is modified to allow this case. Signed-off-by: Justin Cinkelj --- loader.cc | 11

Re: [PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Nadav Har'El
Gregor, can you please test if this patch really makes your /dev/urandom hang go away? Tomek and/or Pekka, can you please review this patch? (its comment is much longer than the actual patch ;-) ). Thanks. -- Nadav Har'El n...@scylladb.com On Thu, Nov 17, 2016 at 10:39 AM, Nadav Har'El wrote:

[PATCH] virtio-rng: don't hang while waiting for entropy

2016-11-17 Thread Nadav Har'El
random_kthread() has a loop, where it tries to get some entropy from all sources (including the ring of internal events), feeds it into the entropy pool, and then sleeps a bit and tries again, ad infinitum. If the read function of *one* of the entropy sources blocks, the entire random_kthread() bl