Beispiel #1
0
// stateStepsFor124 returns upgrade steps for Juju 1.24 that manipulate state directly.
func stateStepsFor124() []Step {
	return []Step{
		&upgradeStep{
			description: "add block device documents for existing machines",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddDefaultBlockDevicesDocs(context.State())
			}},
		&upgradeStep{
			description: "move service.UnitSeq to sequence collection",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.MoveServiceUnitSeqToSequence(context.State())
			}},
		&upgradeStep{
			description: "add instance id field to IP addresses",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddInstanceIdFieldOfIPAddresses(context.State())
			}},
		&upgradeStep{
			description: "add UUID field to IP addresses",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddUUIDToIPAddresses(context.State())
			}},
	}
}
Beispiel #2
0
// stateStepsFor124 returns upgrade steps for Juju 1.24 that manipulate state directly.
func stateStepsFor124() []Step {
	return []Step{
		&upgradeStep{
			description: "add block device documents for existing machines",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddDefaultBlockDevicesDocs(context.State())
			}},
		&upgradeStep{
			description: "move service.UnitSeq to sequence collection",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.MoveServiceUnitSeqToSequence(context.State())
			}},
		&upgradeStep{
			description: "add instance id field to IP addresses",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddInstanceIdFieldOfIPAddresses(context.State())
			}},
		&upgradeStep{
			description: "add UUID field to IP addresses",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.AddUUIDToIPAddresses(context.State())
			},
		},
		&upgradeStep{
			description: "migrate charm archives into environment storage",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return migrateCharmStorage(context.State(), context.AgentConfig())
			},
		},
		&upgradeStep{
			description: "change entityid field on status history to globalkey",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.ChangeStatusHistoryEntityId(context.State())
			},
		},
		&upgradeStep{
			description: "change updated field on statushistory from time to int",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.ChangeStatusHistoryUpdatedType(context.State())
			},
		},
		&upgradeStep{
			description: "change updated field on status from time to int",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return state.ChangeStatusUpdatedType(context.State())
			},
		},
	}
}