Last change
on this file since 2682 was
2023,
checked in by broder, 16 years ago
|
Correctly generate cluster.conf for a two-node cluster.
|
File size:
389 bytes
|
Line | |
---|
1 | <% |
---|
2 | from invirt.config import structs as cfg |
---|
3 | %>\ |
---|
4 | <?xml version="1.0"?> |
---|
5 | <cluster name="invirt" config_version="1"> |
---|
6 | % if len(cfg.hosts) == 2: |
---|
7 | <cman two_node="1" expected_votes="1" /> |
---|
8 | % else: |
---|
9 | <cman /> |
---|
10 | % endif |
---|
11 | <clusternodes> |
---|
12 | % for id, host in enumerate(cfg.hosts): |
---|
13 | <clusternode name="${host.hostname.split('.')[0]}-internal" nodeid="${id + 1}" /> |
---|
14 | % endfor |
---|
15 | </clusternodes> |
---|
16 | </cluster> |
---|
Note: See
TracBrowser
for help on using the repository browser.