Needed to change the semantics of SetSlice(), which previously would
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 13 Oct 2009 22:48:37 +0000 (22:48 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 13 Oct 2009 22:48:37 +0000 (22:48 +0000)
delete *all* tags associated with a slice.  This would wipe out sliver
tags that are set at runtime by both NM and other scripts.

SetSlice() now ignores sliver tags.  The assumption is that the global
defaults that are being set by db-config are just that: global
defaults.  If someone want to override those defaults or introduce new
tags then one should do so using sliver tags.

This is motivated by the hmac tag that is set at run time by NM.  But
there are other tags for which we want similar semantics.

db-config

index 21cd3fd..8333881 100755 (executable)
--- a/db-config
+++ b/db-config
@@ -98,6 +98,8 @@ def SetSlice(slice, tags):
     if slice['slice_tag_ids']:
         # Delete unknown attributes
         for slice_tag in GetSliceTags(slice['slice_tag_ids']):
+            # ignore sliver tags, as those are custom/run-time values
+            if slice_tag['node_id'] <> None: continue
             if (slice_tag['tagname'], slice_tag['value']) not in tags:
                 DeleteSliceTag(slice_tag['slice_tag_id'])
             else: