Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sles 15 sp2 distro #2272

Merged
merged 4 commits into from
Jun 17, 2021
Merged

Support sles 15 sp2 distro #2272

merged 4 commits into from
Jun 17, 2021

Conversation

nagworld9
Copy link
Contributor

@nagworld9 nagworld9 commented Jun 11, 2021

Description

Issue # TASK 8742449

Add support for SLES 15 distro

DCR run


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@nagworld9 nagworld9 changed the title support sles 15 sp2 distro Support sles 15 sp2 distro Jun 11, 2021
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #2272 (2d2b41a) into develop (9da99cc) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2272      +/-   ##
===========================================
+ Coverage    70.80%   70.81%   +0.01%     
===========================================
  Files           96       96              
  Lines        13857    13857              
  Branches      1979     1979              
===========================================
+ Hits          9811     9813       +2     
- Misses        3618     3619       +1     
+ Partials       428      425       -3     
Impacted Files Coverage Δ
azurelinuxagent/common/event.py 85.26% <0.00%> (-0.69%) ⬇️
azurelinuxagent/ga/collect_telemetry_events.py 91.43% <0.00%> (+1.71%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9da99cc...2d2b41a. Read the comment docs.

narrieta
narrieta previously approved these changes Jun 11, 2021
@@ -165,6 +165,13 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
else:
# sles 12+ and openSUSE 13.2+ use systemd
set_systemd_files(data_files, dest=systemd_dir_path)
elif name == 'sles': # sles 15+ distro named as sles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you confirmed this comment? -

sles 15+ distro named as sles

I mean what does suse 13,14,etc do? Do we even have those distros? It would be wise to check all this out before committing it to code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have 13.x, 14.x versions and also, azure not endorsed those distros.

kevinclark19a
kevinclark19a previously approved these changes Jun 15, 2021
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd suggest naming the new directory 'py3' or something like that instead of 'v2'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

setup.py Outdated
@@ -43,6 +43,10 @@ def set_bin_files(data_files, dest, src=None):
src = ["bin/waagent", "bin/waagent2.0"]
data_files.append((dest, src))

def set_bin_version2_files(data_files, dest, src=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this new function, do we? we can use set_bin_files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea for separate function is we only set new binary file if that distro has py3 requirement rest we use set_bin_files.

Copy link
Contributor Author

@nagworld9 nagworld9 Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping in one place required extra logic and need to know distro type again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only thing we are changing is the default value... am i missing something? instead of creating a new function with a different default value you could just call the original function with the different value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and we also need to copy waagent2.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only for SLES.. The setup was codded in way that we set binary files first irrespective of what distro it is.. If we want to call only one time then I would have to remove that and include all 10 if block statements..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling outside

set_bin_files(data_files, dest=agent_bin_path)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I looked at the rest of the code and it could be better abstracted, but for now calling set_bin_files with the correct files for each of the distros (just ad we call set_conf_files) would be clearer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool I will update that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

@nagworld9 nagworld9 merged commit 68559c5 into Azure:develop Jun 17, 2021
@nagworld9 nagworld9 deleted the setup-sles branch June 17, 2021 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants