Closed Bug 785315 Opened 13 years ago Closed 11 years ago

Change sync configuration to avoid using a default sql URI

Categories

(Cloud Services :: Operations: Miscellaneous, task, P3)

x86
Linux
task

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: rfkelly, Assigned: bobm)

References

Details

(Whiteboard: [qa+])

I'm spinning this off from Bug 637523 as a separate suggestion. Currently in the sync configuration file, we specify a "default" storage configuration like this: [storage] backend = syncstorage.storage.memcachedsql.MemcachedSQLStorage sqluri = <valid database connection uri> standard_collections = true ...etc... And then provide the database details for each node name in a host-specific section like this: [host:stage-sync1.services.mozilla.com] storage.sqluri = <host-specific database uri> The problem is that any nodes without a [host] section will fall back to using the database uri specified in the default [storage] section. It would be better if such cases caused a noisy error, because they represent a misconfiguration that we should never encounter them in production. It would be good to enforce/prevent this in code, but there is something we can do in the meantime: set the default sqluri to something invalid. Maybe like: [storage] backend = syncstorage.storage.memcachedsql.MemcachedSQLStorage sqluri = pymysql://INVALID:PASSWORD@sync1.db.s.m.c/INVALID standard_collections = true ...etc... If my experiments locally hold true in the deployment env, this should allow the config to be parsed and loaded successfully, but give an error if it ever tries to use this default storage backend at runtime. It's an ugly hack, but maybe worth it to guard against misconfiguration?
Whiteboard: [qa+]
cc'ing :bobm since this is an outstanding sync ops improvement.
Blocks: 784598
Taking this ticket.
Assignee: nobody → bobm
Status: NEW → ASSIGNED
Priority: -- → P3
We don't need this for sync1.5 and I think we should avoid any unnecessary changes for sync1.1, so maybe we just WONTFIX this?
Yep.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.