| 1954 | } |
| 1955 | |
| 1956 | func prepareDiskLabelPrefix(labelPrefix string) string { |
| 1957 | // Keep 36 chars to avoid too long GPT partition names |
| 1958 | labelPrefix = "bosh-partition-" + labelPrefix |
| 1959 | if len(labelPrefix) > 33 { |
| 1960 | // Remain one dash and two digits space |
| 1961 | labelPrefix = labelPrefix[0:32] |
| 1962 | } |
| 1963 | |
| 1964 | return labelPrefix |
| 1965 | } |
| 1966 | |
| 1967 | // SetupFirewall initializes the nftables-based firewall for protecting monit and NATS. |
| 1968 | // This should be called during platform setup, before NATS connections are attempted. |