-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change site and machine namespace to use continent name #110
base: upstream
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ class PlenaryCity(Plenary): | |
|
||
@classmethod | ||
def template_name(cls, dbcity): | ||
return "%s/%s/%s/config" % (cls.prefix, dbcity.hub.fullname.lower(), | ||
return "%s/%s/%s/config" % (cls.prefix, dbcity.continent.name, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we cannot yet merge this cause we need to fix a 'bug' in city templates for timezones. but in general we agree with the change - just let us prepare for it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem. |
||
dbcity.name) | ||
|
||
def body(self, lines): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ class PlenaryMachineInfo(StructurePlenary): | |
@classmethod | ||
def template_name(cls, dbmachine): | ||
loc = dbmachine.location | ||
return "%s/%s/%s/%s/%s" % (cls.prefix, loc.hub.fullname.lower(), | ||
return "%s/%s/%s/%s/%s" % (cls.prefix, loc.continent.name, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have discussed this with Gabor just now: he suggest to take this even further and get rid of location attributes from the template path: and leave only (cls.prefix, dbmachine.label). Would this work for you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem for me... but will mean a directory with thousands or ten of thousands entries... Is it really what you want? I agree that the current hierarchy is probably too much but keeping the continent+building or continent+city or even just the city may be not so bad.... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about creating a structure using the first letters of the dbmachine.label ?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting suggestion, easy to implement... Not sure how diverse the machine names are, in particular their first letter. Ours tend to be something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our machine names come from another system and start with one of: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we really need to break it up, how about using a modulus of the return "%s/%02x/%s" % (cls.prefix, dbmachine.id % 256, dbmachine.label) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either that, or if you want something more ordered, how about groups of no more than 1000? return "%s/%02d/%s" % (cls.prefix, dbmachine.id / 1000, dbmachine.label) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jrha I think it would be good to have it easy to deduce from the machine information. |
||
loc.building, loc.rack, dbmachine.label) | ||
|
||
def __init__(self, dbobj, **kwargs): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general we agree - it is a good fix - but we have to make huge template change change to allow this to go out cause we have some sysloc template code that would start failing if we just roll this out... I suggest to create a separate PR for this if we want to release the other changes sooner :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look it if makes sense but will probably not do anything before end of August anyway... What's your timeframe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@urbonegi Looking in more details, I don't understand this comment. You mean that adding
sysloc/region
will make your existing code failing? Else the modification doesn't change anything to the current template contents (except a minor sysloc property reordering, with rack name before the rack info).