Skip to content

Commit b724d0e

Browse files
authored
Merge pull request #68 from pndaproject/PNDA-4389
Reject packages containing upstart.conf files
2 parents 4b3ea3f + fcf6803 commit b724d0e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

api/src/main/resources/plugins/sparkStreaming.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def validate_component(self, component):
4040
errors.append('missing file application.properties')
4141
if 'log4j.properties' not in file_list:
4242
errors.append('missing file log4j.properties')
43+
if 'upstart.conf' in file_list:
44+
errors.append('Support for user supplied upstart.conf files has been deprecated, ' +
45+
'the deployment manager will supply one automatically. ' +
46+
'Please see PNDA example-applications for usage.')
4347
return errors
4448

4549
def get_component_type(self):
@@ -85,9 +89,10 @@ def create_component(self, staged_component_path, application_name, user_name, c
8589
properties['component_py_files'] = ''
8690

8791
if 'upstart.conf' in component['component_detail']:
88-
# old style applications for backward compatibility
89-
service_script = 'upstart.conf'
90-
service_script_install_path = '/etc/init/%s.conf' % service_name
92+
# old style applications - reject these
93+
raise Exception('Support for user supplied upstart.conf files has been deprecated, ' +
94+
'the deployment manager will supply one automatically. ' +
95+
'Please see PNDA example-applications for usage.')
9196
else:
9297
# new style applications that don't need to provide upstart.conf or yarn-kill.py
9398
if 'component_main_jar' in properties and 'component_main_class' not in properties:

0 commit comments

Comments
 (0)