Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-19 Thread Joris Van Remoortere

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/#review99678
---

Ship it!


Refactored a little as per Anand's suggestion.

- Joris Van Remoortere


On Sept. 14, 2015, 2:19 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38251/
> ---
> 
> (Updated Sept. 14, 2015, 2:19 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-3169
> https://issues.apache.org/jira/browse/MESOS-3169
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> FrameworkInfo should only be updated if the re-registration is valid
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 
> 
> Diff: https://reviews.apache.org/r/38251/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-18 Thread Anand Mazumdar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/#review99632
---


Thanks for fixing this @gyliu ! Just a minor comment about a alternate simple 
approach that would allow us to not duplicate the same log messages twice. I 
commented only on the HTTP workflow but the same comment also applies to the 
PID based workflow.


src/master/master.cpp (line 1959)


I wonder if we can simply do this instead of duplicating the log messages 
twice. What do you think ? ( Don't copy my suggested comments in the 
code-snippet though :-) )

```
if (framework->connected && !subscribe.force()) {
 FrameworkErrorMessage message;
 ... blah blah
 http.close();
 return;
}

// It's now safe to update the framework fields since the request is now 
gurranteed to be successful.

LOG(INFO) << "Updating info for framework " << framework->id();

framework->updateFrameworkInfo(frameworkInfo);
allocator->updateFramework(framework->id(),  framework->info);

framework->reregisteredTime = Clock::now();

if (subscribe.force()) {
  // already existing logic blah blah.
} else {
  // already existing logic blah blah.
}
```


- Anand Mazumdar


On Sept. 14, 2015, 2:19 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38251/
> ---
> 
> (Updated Sept. 14, 2015, 2:19 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-3169
> https://issues.apache.org/jira/browse/MESOS-3169
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> FrameworkInfo should only be updated if the re-registration is valid
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 
> 
> Diff: https://reviews.apache.org/r/38251/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-13 Thread Guangya Liu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/
---

(Updated 九月 14, 2015, 2:19 a.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Bugs: MESOS-3169
https://issues.apache.org/jira/browse/MESOS-3169


Repository: mesos


Description
---

FrameworkInfo should only be updated if the re-registration is valid


Diffs
-

  src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 

Diff: https://reviews.apache.org/r/38251/diff/


Testing
---


Thanks,

Guangya Liu



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-11 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/#review98602
---


Patch looks great!

Reviews applied: [38251]

All tests passed.

- Mesos ReviewBot


On Sept. 11, 2015, 5:06 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38251/
> ---
> 
> (Updated Sept. 11, 2015, 5:06 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-3184
> https://issues.apache.org/jira/browse/MESOS-3184
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> FrameworkInfo should only be updated if the re-registration is valid
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 
> 
> Diff: https://reviews.apache.org/r/38251/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-10 Thread Guangya Liu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/
---

(Updated Sept. 10, 2015, 10:12 a.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Bugs: MESOS-3184
https://issues.apache.org/jira/browse/MESOS-3184


Repository: mesos


Description
---

FrameworkInfo should only be updated if the re-registration is valid


Diffs
-

  src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 

Diff: https://reviews.apache.org/r/38251/diff/


Testing
---


Thanks,

Guangya Liu



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-10 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/#review98396
---


Patch looks great!

Reviews applied: [38251]

All tests passed.

- Mesos ReviewBot


On Sept. 10, 2015, 10:12 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38251/
> ---
> 
> (Updated Sept. 10, 2015, 10:12 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-3184
> https://issues.apache.org/jira/browse/MESOS-3184
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> FrameworkInfo should only be updated if the re-registration is valid
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 
> 
> Diff: https://reviews.apache.org/r/38251/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-10 Thread Yong Qiao Wang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/#review98394
---



src/master/master.cpp 


If the frameworkInfo.id()and framework->pid do not changed when reregister, 
then it does not need to call slave to update framework pid. This "return" can 
gurad this, so this return does not be removed.


- Yong Qiao Wang


On Sept. 10, 2015, 10:12 a.m., Guangya Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38251/
> ---
> 
> (Updated Sept. 10, 2015, 10:12 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Vinod Kone.
> 
> 
> Bugs: MESOS-3184
> https://issues.apache.org/jira/browse/MESOS-3184
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> FrameworkInfo should only be updated if the re-registration is valid
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 
> 
> Diff: https://reviews.apache.org/r/38251/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>



Re: Review Request 38251: FrameworkInfo should only be updated if the re-registration is valid

2015-09-10 Thread Guangya Liu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38251/
---

(Updated 九月 11, 2015, 5:06 a.m.)


Review request for mesos, Joris Van Remoortere and Vinod Kone.


Bugs: MESOS-3184
https://issues.apache.org/jira/browse/MESOS-3184


Repository: mesos


Description
---

FrameworkInfo should only be updated if the re-registration is valid


Diffs (updated)
-

  src/master/master.cpp 4b60e637b19e749e27c4a8eb9b0a95c7e9305c5f 

Diff: https://reviews.apache.org/r/38251/diff/


Testing
---


Thanks,

Guangya Liu