mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 53559: Transformed env variable parsing into Flags in process.cpp.
Date Wed, 09 Nov 2016 18:28:05 GMT


> On Nov. 8, 2016, 1:43 a.m., Gastón Kleiman wrote:
> > 3rdparty/libprocess/src/process.cpp, line 201
> > <https://reviews.apache.org/r/53559/diff/1/?file=1556362#file1556362line201>
> >
> >     ditto
> 
> Gastón Kleiman wrote:
>     @joseph: do you know what libprocess advertises if this is set to `0`? Does advertising
a randomly chosen port make sense? And what if `LIBPROCESS_PORT = 31337` and `LIBPROCESS_ADVERTISE_PORT
= 0`?

Hm... the current code is this:
```
  value = os::getenv("LIBPROCESS_ADVERTISE_PORT");
  if (value.isSome()) {
    Try<int> result = numify<int>(value.get().c_str());
    if (result.isSome() && result.get() >=0 && result.get() <= USHRT_MAX)
{
      __address__.port = result.get();
    } else {
      LOG(FATAL) << "LIBPROCESS_ADVERTISE_PORT=" << value.get()
                 << " is not a valid port";
    }
  }
```

A zero port here is clearly incorrect.  Hard to believe we haven't had anyone run into this.


- Joseph


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


On Nov. 7, 2016, 5:51 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53559/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2016, 5:51 p.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Bugs: MESOS-4609
>     https://issues.apache.org/jira/browse/MESOS-4609
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Environment variables LIBPROCESS_ + (IP, ADVERTISE_IP,PORT,
> ADVERTISE_PORT) are now in a Flags object. Heavily inspired
> by Joseph's review request [43261](https://reviews.apache.org/r/43261/).
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp ab2b5a9d38a3001d6a5daa1807fecb630c4b154d 
> 
> Diff: https://reviews.apache.org/r/53559/diff/
> 
> 
> Testing
> -------
> 
> make check (macOS)
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message