> On June 8, 2016, 10:21 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java, > > line 98 > > <https://reviews.apache.org/r/48403/diff/1/?file=1410964#file1410964line98> > > > > So I had thought that we decided to make these optional (which you did) > > but that if you didn't specify them at all, nothing would happen - they'd > > all be false. This would prevent localhost from being accidentally added. > > > > Am I wrong? Seems like it's a good balance - we'll allow XML files with > > no upgrade behavior elements, but if you don't specify them, then they are > > all false. This would prevent the unintentional adding of properties (like > > localhost fields or fields which need to be calculated)
I think making this field false by default would not make a trick because Sumit wants existing customer stacks (that have no on-ambari-upgrade tags) to work as before patch. That's why we would have to make false a default - Dmitro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48403/#review136681 ----------------------------------------------------------- On June 8, 2016, 1:06 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48403/ > ----------------------------------------------------------- > > (Updated June 8, 2016, 1:06 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Jayush > Luniya, Nate Cole, and Sumit Mohanty. > > > Bugs: AMBARI-17112 > https://issues.apache.org/jira/browse/AMBARI-17112 > > > Repository: ambari > > > Description > ------- > > We decided to split changes to stack config xmls and processing of them into > few patches. > Current patch changes validation rules and available fields > > Splitted PropertyUpgradeBehavior into 2 classes. > PropertyAmbariUpgradeBehavior - defines behavior for ambari upgrade. > on-ambari-upgrade now has the same 3 attributes, but all are optional. > Default value for add is true, false for others. > > PropertyStackUpgradeBehavior - defines behavior for stack upgrade. > on-stack-upgrade now has one attribute - add, and it is required. > > Modified property update script and xsd schema to satisfy new requirements. > > If patch looks good, I'll modify all stack configs to comply with it and > commit both patches at the same time. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java > fba2daa > > ambari-server/src/main/java/org/apache/ambari/server/state/PropertyUpgradeBehavior.java > de2e342 > > ambari-server/src/main/java/org/apache/ambari/server/state/PropertyUpgradeBehavior.java > de2e342 > ambari-server/src/main/resources/configuration-schema.xsd d49cbf8 > > ambari-server/src/main/resources/scripts/configurations-set-default-update-policy.sh > 930f778 > > ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java > 9a3d195 > > Diff: https://reviews.apache.org/r/48403/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Dmitro Lisnichenko > >