Implement internal state machine with no transaction required

https://bugzilla.redhat.com/show_bug.cgi?id=1089061