Uh oh!
There was an error while loading. Please reload this page.
CLOUDSTACK-2998: Added two more device name patterns to valid bridge slaves (lo* and dummy*) - #3000
Conversation
bwsw
commented
Nov 5, 2018
Bug listed in the build |
bwsw
commented
Nov 5, 2018
@TestpublicvoidzonedTimeFormatIsoNoColonZMs() throwsParseException {
Datetime = newDate();
DateTimeFormatterformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ");
Stringstr = OffsetDateTime.now().format(formatter);
DatedtParsed = DateUtil.parseTZDateString(str);
assertEquals(str, time.toString(), dtParsed.toString());
}This unittest is obviously buggy. Because there are two times objects are used to get current DT, as a result, sometimes it fails. |
bwsw
commented
Nov 5, 2018
Bug introduced here: #2893 |
yadvr
commented
Nov 5, 2018
Can you check Travis failure @bwsw, also drop the old styled s_ variable name. |
bwsw
commented
Nov 5, 2018
@rhtyd I have checked, please take a look at |
bwsw
commented
Nov 5, 2018
@rhtyd varname is fixed. |
yadvr
commented
Nov 5, 2018
@bwsw you're welcome to fix the unit test in this or a separate PR, otherwise someone eventually will. |
| if (vmTO.getType() != VirtualMachine.Type.User) { | ||
| devices.addDevice(new ChannelDef(vmTO.getName() + ".vport", ChannelDef.ChannelType.UNIX, | ||
| new File(_qemuSocketsPath + "/" + vmTO.getName() + ".agent"))); | ||
| new File(_qemuSocketsPath + "/" + vmTO.getName() + ".agent"))); |
There was a problem hiding this comment.
While you are busy with this, why not use File.seperator?
There was a problem hiding this comment.
@wido it's not me. It's IDEA did that occasionally.
| /* Add a VirtIO channel for the Qemu Guest Agent tools */ | ||
| devices.addDevice(new ChannelDef(_qemuGuestAgentSocketName, ChannelDef.ChannelType.UNIX, | ||
| new File(_qemuSocketsPath + "/" + vmTO.getName() + "." + _qemuGuestAgentSocketName))); | ||
| new File(_qemuSocketsPath + "/" + vmTO.getName() + "." + _qemuGuestAgentSocketName))); |
bwsw
commented
Nov 5, 2018
@wido I addressed your comments by refactoring the code even further. Changed "+" to Paths.get(...) which does it safely. Please, review. |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks, @bwsw.
Code LGTM and all checks have passed.
| } | ||
| String [] _ifNamePatterns = { | ||
| static String [] ifNamePatterns = { |
There was a problem hiding this comment.
@bwsw, what if we invert the logic?
Let me explain myself. We already have 13! (that is too much; it is indeed a nice magic number though) patterns to tell which ones are the valid physical interfaces names that we should look for. However, we can do the opposite. So, we can say that the physical interface is anything that is not “^vnet*”. Then, if I decide to use a physical interface named “XYZ”, I will not need to change anything else in the code.
What do you think?
There was a problem hiding this comment.
@rafaelweingartner I think it's a good extension, but suppose it's a conceptual change which requires voting from the project team. Don't you think so?
Personally, I like your approach, but people "potentially" may meet incompatibilities in their deployments if they have weird bridging configurations.
@rhtyd @PaulAngus@DaanHoogland@wido@GabrielBrascher can give your opinions on such a change, that @rafaelweingartner suggests?
There was a problem hiding this comment.
Is it possible for people to configure/customize the "vnet" name of the interfaces? I thought that was something hard coded in KVM. That is why I thought doing the opposite would be easier.
There was a problem hiding this comment.
@rafaelweingartner they can, but not sure that they can with CloudStack. Actually, your idea that only "vnet" devices must be excluded is good but just would like to get the opinion of other persons before changing that. In theory, it can break someone's deployment even if our tests work well.
There was a problem hiding this comment.
@rafaelweingartner what I personally like is that people will no longer be limited by using "bond" or "team" names for physical interfaces, but can use other semantic names, that they like, the same is for single NICs like "public", "private" instead of eth0, eth1.
There was a problem hiding this comment.
@bwsw I think that the proposal from @rafaelweingartner of inverting the logic is valid and gives us flexibility. I do not see any potential issue that such change would bring to us.
+1 on following that path.
Do you guys share the same thoughts @rhtyd @PaulAngus@DaanHoogland@wido@nvazquez?
There was a problem hiding this comment.
I agree with @rafaelweingartner , @GabrielBrascher , but it would be a separate issue. I am not sure of the consequences so I would leave it out of scope for this PR.
yadvr
commented
Nov 12, 2018
@blueorangutan package |
blueorangutan
commented
Nov 12, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 12, 2018
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2424 |
yadvr
commented
Nov 30, 2018
@bwsw can you fix the conflict, thanks. |
Added two more device names (lo* and dummy*). Implemented tests. Code was refactored. Improved paths concatenation code from "+" to Paths.get.
bwsw
commented
Nov 30, 2018
@rhtyd Conflicts fixed. Local build and tests passed. |
yadvr
commented
Nov 30, 2018
@blueorangutan package |
blueorangutan
commented
Nov 30, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 30, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2475 |
yadvr
commented
Nov 30, 2018
@blueorangutan test |
blueorangutan
commented
Nov 30, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Dec 1, 2018
Trillian test result (tid-3240)
|
Added dummy and lo devices to be treated as a normal bridge slave devs
Description
Changed device names list for bridge slave devices which are valid for networking.
#2998
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
The unit test was improved to handle new device names.