[CRIU] [PATCH] crtools: add addr string to opts.

Pavel Emelyanov xemul at parallels.com
Fri Aug 9 04:48:19 EDT 2013


On 08/09/2013 01:40 AM, Ruslan Kuprieiev wrote:
> On 08.08.2013 23:45, Pavel Emelyanov wrote:
>> On 08/08/2013 09:34 PM, Ruslan Kuprieiev wrote:
>>> On 08.08.2013 19:53, Pavel Emelyanov wrote:
>>>> On 08/08/2013 08:44 PM, Ruslan Kuprieiev wrote:
>>>>> Hello!
>>>>>
>>>>> Added char * addr field to struct cr_options. It will be used as socket
>>>>> address in cr_service(). addr is properly converted into ps_addr if
>>>>> "page-server" command is set.
>>>>>
>>>> You obviously didn't check this change, as ps_addr thing in your
>>>> patch if only initialized for page-server action, while can also
>>>> be used on dump --page-server combination.
>>>>
>>>> Thanks,
>>>> Pavel
>>> Sorry.
>>> Here is another one.
>>>
>> Another? Or one more? In the former case it's not tested either.
>>
>>> @@ -235,9 +235,14 @@ int main(int argc, char *argv[])
>>>   			opts.use_page_server = true;
>>>   			break;
>>>   		case 51:
>>> -			if (!inet_aton(optarg, &opts.ps_addr.sin_addr)) {
>>> -				pr_perror("Bad address");
>>> -				return -1;
>>> +			if (opts.use_page_server) {
>> First of all, options may go in any order. And this
>>
>> dump --address 127.0.0.1 --page-server
>>
>> should work.
>>
>> But that's minor. The major thing is that -- the page-server action now lacks
>> char -> sockaddr_in conversion.
>>
>>> +				if (!inet_aton(optarg,
>>> +						&opts.ps_addr.sin_addr)) {
>>> +					pr_perror("Bad address");
>>> +					return -1;
>>> +				}
>>> +			} else {
>>> +				opts.addr = strdup(optarg);
>>>   			}
>>>   			break;
>>>   		case 52:
> I guess, i understood what should i do.
> Here is one more version.
> As for me, it should work, but when i`m trying to dump program with:
> 
> dump --address 127.0.0.1 --page-server
> 
> i get an error, that says "Connection refused".
> Am i doing something wrong again?

Sure you do. Who has launched the page-server itself? --page-server option for dump
says "dump pages directly to page sever", while page-server action says "start page
server and listen for incoming connections".

> 




More information about the CRIU mailing list