diff --git a/xos/synchronizer/steps/sync_onos_netcfg.py b/xos/synchronizer/steps/sync_onos_netcfg.py
index 67dc878..f9085ac 100644
--- a/xos/synchronizer/steps/sync_onos_netcfg.py
+++ b/xos/synchronizer/steps/sync_onos_netcfg.py
@@ -59,17 +59,22 @@
         return service_instances
 
     def save_service_instance_attribute(self, service_instance, name, value):
+        # returns True if something changed
+        something_changed=False
         tas = ServiceInstanceAttribute.objects.filter(service_instance_id=service_instance.id, name=name)
         if tas:
             ta = tas[0]
             if ta.value != value:
                 logger.info("updating %s with attribute" % name)
                 ta.value = value
-                ta.save()
+                ta.save(update_fields=["value", "updated"], always_update_timestamp=True)
+                something_changed = True
         else:
             logger.info("saving autogenerated config %s" % name)
             ta = model_accessor.create_obj(ServiceInstanceAttribute, service_instance=service_instance, name=name, value=value)
             ta.save()
+            something_changed = True
+        return something_changed
 
     # This function currently assumes a single Deployment and Site
     def get_onos_netcfg(self, vtn):
@@ -199,4 +204,8 @@
 
         service_instances = self.get_service_instances_who_want_config()
         for service_instance in service_instances:
-            self.save_service_instance_attribute(service_instance, "rest_onos/v1/network/configuration/", netcfg)
+            something_changed = self.save_service_instance_attribute(service_instance, "rest_onos/v1/network/configuration/", netcfg)
+            if (something_changed):
+                # make sure we cause the ServiceInstance to be updated as well as the attribute
+                # TODO: revisit this after synchronizer multi-object-watching is complete
+                service_instance.save(update_fields=["updated"], always_update_timestamp=True)
