-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
etcd: set ETCD_UNSUPPORTED_ARCH for Arm64, because while it builds on… #76995
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to set ETCD_UNSUPPORTED_ARCH
?
Formula/etcd.rb
Outdated
@@ -42,6 +59,7 @@ def plist | |||
<key>Label</key> | |||
<string>#{plist_name}</string> | |||
<key>ProgramArguments</key> | |||
#{plist_unsupported_platformenv} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break the plist
, since the array [*] below is now a value with no key?
[*] This one:
<array>
<string>#{opt_bin}/etcd</string>
</array>
I think this also sets the environment variable for an entirely separate process, which is probably not what we want here.
The correct entry to add to the plist
is probably (from man launchd.plist
):
EnvironmentVariables <dictionary of strings>
This optional key is used to specify additional environmental variables to be set before running the job. Each
key in the dictionary is the name of an environment variable, with the corresponding value being a string repre-
senting the desired value. NOTE: Values other than strings will be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh I might have broken the plist.
Lemme see if I can figure that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not used plists much.
I'll fix it to add that instead.
@carlocab etcd won't start without that var.
|
I'll rebase and commit with the fixed plist:
|
@carlocab lemme know what you think of that. ty. |
The new See, for example: Lines 324 to 330 in c41973c
or homebrew-core/Formula/httpd.rb Lines 129 to 133 in c41973c
|
That is far better, and it might fix the issue where it etcd complains. |
I think you should just be able to do environment_variables ETCD_UNSUPPORTED_ARCH: "arm64" if Hardware::CPU.arm? in a |
Formula/etcd.rb
Outdated
keep_alive true | ||
working_dir var | ||
end | ||
|
||
def plist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to delete the plist
method when using a service
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol I was wondering that ty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed plist section
Tested out service and it seems to work:"
% /opt/homebrew/bin/etcdctl put foo bar
OK
% /opt/homebrew/bin/etcdctl get foo
foo
bar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, not happy with that.
The problem is, the way it is, we're not supporting arm at all, and I only looked specifically at arm on macOS.
updating to catch that specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Homebrew doesn't support arm in Linux so that would be fine like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m still fighting with the service block
Last night it was complaining about plist
I’ll paste the error here soon
… Arm, it's not explicitly supported on m1 yet Use a service block for etcd remove plist section
@carlocab I think I've gotten somewhere with this.
|
Correction, I don't think it's officially supported on MacOS arm64 This pr looks like it's supporting arm64, but as far as I can tell it's graviton |
on_macos do | ||
if Hardware::CPU.arm? | ||
# etcd isn't officially supported on arm64 | ||
# https://github.com/etcd-io/etcd/issues/10318 | ||
# https://github.com/etcd-io/etcd/issues/10677 | ||
ENV["ETCD_UNSUPPORTED_ARCH"]="arm64" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they don't support ARM at all, maybe we don't need this in an on_macos
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They seem to be about to support arm on Linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @areese. Will dispatch a bottle build separately.
@carlocab This is what I was seeing last night that I don't fully understand:
The service is working fine. |
Oh, huh. So, to be sure, you see an error about the CC @SMillerDev in case you know what's going on there. |
Bottled in a331500. |
Yeah that’s what confused me i had tested the service and ran audit and then rebuilt after adding the on macos and noticed this |
I left this part of the patch on my desk some how, but given the conversation the only relevant part is I'm going to reproduce the plist complaint I had
|
Hm, I'm not sure |
I bet that's what the problem is, as I just pulled master and don't see the error, and I don't have the on_macos in master. |
… Arm, it's not explicitly supported on m1 yet
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?etcd isn't officially supported on m1, so this sets the flag for it.
Not sure how you want to handle this.
The upstream issue seems to be: etcd-io/etcd#10318