| 415 | } |
| 416 | |
| 417 | func (p *proxy) initClusterConfig(uuid string) (config *globalConfig, err error) { |
| 418 | debug.Assert(p.owner.smap.get().isPrimary(p.si)) |
| 419 | |
| 420 | // Create version 1 of the cluster config and set primary URL. |
| 421 | return p.owner.config.modify(&configModifier{ |
| 422 | pre: func(ctx *configModifier, clone *globalConfig) (updated bool, err error) { |
| 423 | debug.Assert(clone.version() == 0) |
| 424 | clone.Proxy.PrimaryURL = p.si.URL(cmn.NetPublic) |
| 425 | clone.UUID = uuid |
| 426 | updated = true |
| 427 | return |
| 428 | }, |
| 429 | }) |
| 430 | } |
| 431 | |
| 432 | // resume rebalance if needed |
| 433 | func (p *proxy) resumeReb(smap *smapX, config *cmn.Config) { |