{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/20724","labels_url":"https://api.github.com/repos/saltstack/salt/issues/20724/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/20724/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/20724/events","html_url":"https://github.com/saltstack/salt/issues/20724","id":57803344,"number":20724,"title":"djangomod.syncdb returns success when command fails","user":{"login":"johtso","id":830800,"avatar_url":"https://avatars.githubusercontent.com/u/830800?v=3","gravatar_id":"","url":"https://api.github.com/users/johtso","html_url":"https://github.com/johtso","followers_url":"https://api.github.com/users/johtso/followers","following_url":"https://api.github.com/users/johtso/following{/other_user}","gists_url":"https://api.github.com/users/johtso/gists{/gist_id}","starred_url":"https://api.github.com/users/johtso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johtso/subscriptions","organizations_url":"https://api.github.com/users/johtso/orgs","repos_url":"https://api.github.com/users/johtso/repos","events_url":"https://api.github.com/users/johtso/events{/privacy}","received_events_url":"https://api.github.com/users/johtso/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Medium%20Severity","name":"Medium Severity","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/48","html_url":"https://github.com/saltstack/salt/milestones/Under%20Review","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/48/labels","id":856250,"number":48,"title":"Under Review","description":"","creator":{"login":"ssgward","id":8439595,"avatar_url":"https://avatars.githubusercontent.com/u/8439595?v=3","gravatar_id":"","url":"https://api.github.com/users/ssgward","html_url":"https://github.com/ssgward","followers_url":"https://api.github.com/users/ssgward/followers","following_url":"https://api.github.com/users/ssgward/following{/other_user}","gists_url":"https://api.github.com/users/ssgward/gists{/gist_id}","starred_url":"https://api.github.com/users/ssgward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssgward/subscriptions","organizations_url":"https://api.github.com/users/ssgward/orgs","repos_url":"https://api.github.com/users/ssgward/repos","events_url":"https://api.github.com/users/ssgward/events{/privacy}","received_events_url":"https://api.github.com/users/ssgward/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":19,"state":"open","created_at":"2014-11-06T17:18:17Z","updated_at":"2015-05-19T20:24:29Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-02-16T13:19:52Z","updated_at":"2015-05-19T20:28:18Z","closed_at":null,"body":"```\r\nID: app_migrate\r\n    Function: module.run\r\n        Name: django.syncdb\r\n      Result: True\r\n     Comment: Module function django.syncdb executed\r\n     Started: 17:15:04.016255\r\n    Duration: 490.249 ms\r\n     Changes:\r\n              ----------\r\n              ret:\r\n                  CommandError: Conflicting migrations detected (0016_auto_20150210_1255, 0017_migration in app).\r\n                  To fix them run 'python manage.py makemigrations --merge'\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/103659530","html_url":"https://github.com/saltstack/salt/issues/20724#issuecomment-103659530","issue_url":"https://api.github.com/repos/saltstack/salt/issues/20724","id":103659530,"user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T20:28:18Z","updated_at":"2015-05-19T20:28:18Z","body":"The module.run state is working just fine here, it will always return True when it is succesfully able to run a function. It will only return False when the function doesn't exist (or a requisite fails).\r\n\r\nAt issue here is the fact that remote execution furnctions return a wide variety of data types, and we have no way of reliably determining what is a ``True`` result. Is ``0`` True or False? It really depends on the circumstance.\r\n\r\nThe best solution here is to add a django state module that provides a ``django.syncdb`` state, which will execute a syncdb and report on the results. This will allow us to have specific logic that will interpret the results and give a meaningful response."}}