OpenVZ Forum


Home » Mailing lists » Devel » communicating between host and VPS
communicating between host and VPS [message #7522] Mon, 16 October 2006 22:32 Go to next message
John Paul Walters is currently offline  John Paul Walters
Messages: 10
Registered: October 2006
Junior Member
I'm wondering if there's a preferred way to communicate between a host
and a VPS. For example, I'd like a VPS to occasionally communicate to
the host and request a checkpoint on its behalf. I suppose I could use
a named pipe or something, but was wondering if there's a better
mechanism that's typically used. Any thoughts?

thanks,
JP
Re: communicating between host and VPS [message #7559 is a reply to message #7522] Tue, 17 October 2006 13:27 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

John,

AFAIK, it can be done via unix socket or FIFO,
since both are limited by the viewpoint of file system and
host always can see VE files.
It also can be done via TCP or UDP.

AFAICS, in your case you are going to send only a small piece of data,
so any of these communications should be good for you.

Thanks,
Kirill

> I'm wondering if there's a preferred way to communicate between a host
> and a VPS. For example, I'd like a VPS to occasionally communicate to
> the host and request a checkpoint on its behalf. I suppose I could use
> a named pipe or something, but was wondering if there's a better
> mechanism that's typically used. Any thoughts?
>
> thanks,
> JP
>
Re: communicating between host and VPS [message #7565 is a reply to message #7522] Tue, 17 October 2006 14:41 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Grzegorz,

>>AFAIK, it can be done via unix socket or FIFO,
>>since both are limited by the viewpoint of file system and
>>host always can see VE files.
>
>
> I want to clarify because I am also interested in something like this:
> will UNIX sockets or FIFOs work between VE and VE0 and between one VE and
> the other if and only if both sides see the node in the filesystem?
yes. However, from what I see in the code it looks like unix socket works
if VE does listen() and VE0 does connect() only.

> If so, is this design goal or something that works for now but could stop
> working some day?
unix socket is done so by design and won't be broken 100% as there are some
tools using this property.

for fifo - not that sure and didn't try that. however, if it works (it should!),
most likely won't be broken as well.

Thanks,
Kirill
Re: communicating between host and VPS [message #7566 is a reply to message #7565] Tue, 17 October 2006 14:48 Go to previous messageGo to next message
Grzegorz Kulewski is currently offline  Grzegorz Kulewski
Messages: 2
Registered: October 2006
Junior Member
On Tue, 17 Oct 2006, Kirill Korotaev wrote:
> Grzegorz,
>
>>> AFAIK, it can be done via unix socket or FIFO,
>>> since both are limited by the viewpoint of file system and
>>> host always can see VE files.
>>
>>
>> I want to clarify because I am also interested in something like this:
>> will UNIX sockets or FIFOs work between VE and VE0 and between one VE and
>> the other if and only if both sides see the node in the filesystem?
> yes. However, from what I see in the code it looks like unix socket works
> if VE does listen() and VE0 does connect() only.

Why is it done so? Security reasons?

How about communication between one VE and another VE?


Thanks,

Grzegorz Kulewski
Re: communicating between host and VPS [message #7567 is a reply to message #7566] Tue, 17 October 2006 14:58 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

> Why is it done so? Security reasons?
yes. it is a small hole (safe) done specifically for communication
between VE and VE0.
actually, if you use OpenVZ kernel compiled by yourself, you can think over
removing of some other restrictions and if it is safe patch the kernel.

> How about communication between one VE and another VE?
The only good/clean/easiest way is TCP/UDP IMHO.
Well, it is possible to share some part of disk between VEs,
but does it worth doing this complicated configuration?

Thanks,
Kirill
Re: communicating between host and VPS [message #7568 is a reply to message #7559] Tue, 17 October 2006 14:02 Go to previous message
Grzegorz Kulewski is currently offline  Grzegorz Kulewski
Messages: 2
Registered: October 2006
Junior Member
Hi,

On Tue, 17 Oct 2006, Kirill Korotaev wrote:
> AFAIK, it can be done via unix socket or FIFO,
> since both are limited by the viewpoint of file system and
> host always can see VE files.

I want to clarify because I am also interested in something like this:
will UNIX sockets or FIFOs work between VE and VE0 and between one VE and
the other if and only if both sides see the node in the filesystem?

If so, is this design goal or something that works for now but could stop
working some day?


Thanks,

Grzegorz Kulewski
Previous Topic: 32 bit quota tools problem on 64bit architectures
Next Topic: [PATCH] diskquota: 32bit quota tools on 64bit architectures
Goto Forum:
  


Current Time: Sun Sep 01 08:27:08 GMT 2024

Total time taken to generate the page: 0.05966 seconds