Project

General

Profile

Bug #9610

Updated by Nicolas CHARLES about 8 years ago

Global while changing policy mode is "enforce, not overridable" 
 On a on the directive screen, if I change a directive from "Use global mode" to "Audit", then save, then change back to "Use global mode", I get got the following stacktrace  
 error, which was completely silent, except in the logs 
 <pre> 
 [2016-11-03 08:16:52] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /ajax_request/F521541584802IIAGHP-b0/ 

 java.lang.NullPointerException: null 
         at com.normation.rudder.domain.policies.PolicyMode$$anonfun$1.apply(PolicyMode.scala:51) 
         at com.normation.rudder.domain.policies.PolicyMode$$anonfun$1.apply(PolicyMode.scala:51) 
         at scala.collection.immutable.Set$Set2.find(Set.scala:137) 
         at com.normation.rudder.domain.policies.PolicyMode$.parse(PolicyMode.scala:51) 
         at com.normation.rudder.domain.policies.PolicyMode$.parseDefault(PolicyMode.scala:63) 
         at com.normation.rudder.repository.ldap.LDAPDiffMapper$$anonfun$modChangeRecords2DirectiveSaveDiff$2$$anonfun$apply$12.apply(LDAPDiffMapper.scala:237) 
         at com.normation.rudder.repository.ldap.LDAPDiffMapper$$anonfun$modChangeRecords2DirectiveSaveDiff$2$$anonfun$apply$12.apply(LDAPDiffMapper.scala:213) 
         at com.normation.utils.Control$$anonfun$pipeline$1.apply(Control.scala:146) 
         at com.normation.utils.Control$$anonfun$pipeline$1.apply(Control.scala:143) 
         at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:57) 
         at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:66) 
         at scala.collection.mutable.WrappedArray.foldLeft(WrappedArray.scala:35) 
         at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:151) 
         at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104) 
         at com.normation.utils.Control$.pipeline(Control.scala:143) 
         at com.normation.rudder.repository.ldap.LDAPDiffMapper$$anonfun$modChangeRecords2DirectiveSaveDiff$2.apply(LDAPDiffMapper.scala:213) 
         at com.normation.rudder.repository.ldap.LDAPDiffMapper$$anonfun$modChangeRecords2DirectiveSaveDiff$2.apply(LDAPDiffMapper.scala:212) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.LDAPDiffMapper.modChangeRecords2DirectiveSaveDiff(LDAPDiffMapper.scala:212) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90$$anonfun$apply$94$$anonfun$apply$96.apply(LDAPDirectiveRepository.scala:608) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90$$anonfun$apply$94$$anonfun$apply$96.apply(LDAPDirectiveRepository.scala:607) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90$$anonfun$apply$94.apply(LDAPDirectiveRepository.scala:607) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90$$anonfun$apply$94.apply(LDAPDirectiveRepository.scala:605) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90.apply(LDAPDirectiveRepository.scala:605) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88$$anonfun$apply$90.apply(LDAPDirectiveRepository.scala:603) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88.apply(LDAPDirectiveRepository.scala:603) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86$$anonfun$apply$88.apply(LDAPDirectiveRepository.scala:598) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86.apply(LDAPDirectiveRepository.scala:598) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83$$anonfun$apply$86.apply(LDAPDirectiveRepository.scala:568) 
         at net.liftweb.common.Full.flatMap(Box.scala:612) 
         at com.normation.rudder.repository.ldap.WoLDAPDirectiveRepository$$anonfun$internalSaveDirective$1$$anonfun$apply$83.apply(LDAPDirectiveRepository.scala:568) 

 </pre> 

 Don't know if related, but I have a lot of message like the following one after next generation 
 <pre> 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - Some(JString(enforce)) 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - Some(JBool(true)) 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 
 [2016-11-03 08:17:19] INFO    com.normation.rudder.web.rest.settings.SettingsAPI8 - None 

 </pre>

Back