-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PortManager: start at port 29100 #3975
Conversation
I'm going to check this on my VM in a bit, but it will take a while. |
We should also change the comment on the default value for |
Tests passed. Way better than it was before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Also works on my box |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works fine.
Agreed with Ken's comment though: please update the other 9100
s too... ack 9100
finds these:
cassandane/cassandane.ini.example
74:##base_port = 9100
cassandane/genmail3.pl
66: port => 9100,
cassandane/imap-append.pl
59: port => 9100,
The latter two look like utility scripts which are assuming the default is 9100, but that assumption will no longer hold, and they'll break if used. I don't think we use them, but we can save our future selves a few minutes of confusion if we ever do, by keeping their assumptions updated.
ack '\b91\d\d\b'
additionally finds these ones:
cassandane/Cassandane/Test/MessageStoreFactory.pm
94: $ms = Cassandane::MessageStoreFactory->create(uri => 'imap://victoria:secret@foo.com:9143/inbox.foo');
99: $self->assert($ms->{port} == 9143);
102: $ms = Cassandane::MessageStoreFactory->create(uri => 'imap://victoria@foo.com:9143/inbox.foo');
107: $self->assert($ms->{port} == 9143);
110: $ms = Cassandane::MessageStoreFactory->create(uri => 'imap://foo.com:9143/inbox.foo');
115: $self->assert($ms->{port} == 9143);
... though I don't think these ones actually start a service on that port, they're just testing that the object is created correctly, so they won't actually clash with anything nor care that the default range has changed.
cassandane/Cassandane/PortManager.pm
Outdated
my $cassini_base_port = $cassini->val('cassandane', 'base_port') // 0; | ||
$base_port = 0 + $cassini_base_port || 9100; | ||
$base_port = 0 + $cassini_base_port || 29100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh... $cassini->val()
takes an optional third argument, the default value to use if no value was configured. So these two lines could have been one all along, like:
$base_port = 0 + $cassini->val('cassandane', 'base_port', '[2]9100');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! Done :)
d2ffff2
to
e9a1dad
Compare
e9a1dad
to
43a6bcd
Compare
I saw we ran into a 9100 port issue again recently, so would be great to merge this! @elliefm I did the patch for the default value thing you suggested |
43a6bcd
to
12b1abc
Compare
This is higher and less likely to clash with other things
12b1abc
to
400da32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks :)
This is higher and less likely to clash with other things